0

I'm building a custom opencart payment extension (ocmod installable), I need to use an external payment provider sdk (located in the vendor folder) but i don't know how include this files on my packaged extension

This is my folder structure

..
├── install.xml
└── upload
    ├── admin
    ├── catalog
    ├── composer.json 
    ├── image
    └── vendor
Joel Ibaceta
  • 236
  • 3
  • 15
  • 1
    Opencarts startup.php will automatically load files located in `vendor` (along side your `uploads` directory rather than being inside it. HOWEVER - you'd need to require your customers to install composer. Is there a reason you can't take the code from the SDK and integrate it directly in your controllers/models? – Lucas Krupinski May 08 '17 at 11:38

1 Answers1

0

To develop a payment extention for opencart, follow this structure

admin
│   ├── controller
│   │   ├── payment
│   │   │   ├── custom_payment.php
language
│   │   └── en-GB
│   │       ├── payment
│   │       │   ├── custom_payment.php
template
├── payment
│   ├── custom_payment.tpl


catalog/
├── controller
│   ├── payment
│   │   ├── custom_payment.php
├── language
│   └── en-GB
│       ├── payment
│       │   ├── custom_payment.php
├── model
│   ├── payment
│   │   ├── custom_payment.php
└── view
    └── theme
        ├── default / your_theme
        │   └── template
                ├── payment
                │   ├── custom_payment.tpl
Abdullah Al Shakib
  • 2,034
  • 2
  • 15
  • 16