问题
I want to integrate CitrusPay (An indian payment gateway) in my opencart application. I have received a PHP integration kit but don't know where to start in opencart. Please let me know how to add Citruspay as a payment method.
回答1:
You can edit and modify these files:
/var/www/opencart/catalog/controller/payment
/var/www/opencart/catalog/model/payment
/var/www/opencart/catalog/view/theme/
You can see two folder default and other one you can place it in that other folder in that folder should have template/payments here you have put your .tpl file - PHP MVC.
Then take your admin:
/var/www/opencart/admin/controller/payment
Here you can see other payment file you have to place your admin controller file here, here you can put your admin view file /var/www/opencart/admin/view/template/payment
then take your localhost/opencart/admin
here you can see the extensions->payments
here you can see the available payments and your file, you can install/uninstall from here
回答2:
The easiest way to integrate a new payment gateway is to take a look at a current opencart payment gateway that works in a similar fashion. The Paypal pro extension comes free with opencart, and while you will need to customise it to your needs it serves as a good base for your gateway. Of course, that works based on a CC field. If you're using a third party gateway page, something more along the lines of SagePay may be of use instead
回答3:
The readme document in the zip has the whole process described.
Take a backup of your existing Opencart installation incl. Mysql Database, before installing a new module.
Unzip the content of the module zip in a folder. Upload (FTP) all 3 folders (admin, catalog, citrus) to your Opencart root folder. Select yes when it asks for overwrite.
Now in Opencart login to your admin account and go to Extensions-> Payments option. It will show you Citrus Payment® Instant Checkout as highlighted in the above image.
Click Install option in the right to install the module in Opencart engine.
After installation is over you will see Edit button. Click on Edit option to setup the options. (a.) Fill up Vanity/Payment Url, Merchant Access Key and API Key as provided by Citrus. (b.) Gateway Module option will be “sandbox” for sandbox/test version and “production” for live version. (c.) Change Status option to Enable or Disable to make Citrus Payment Gateway enable or disable. (d.) Give Sort Order and Order Status as per your choice.
Now click save and customer will get Citrus Payment® Instant Checkout in checkout process.
来源:https://stackoverflow.com/questions/11539803/payment-gateway-integration-in-opencart