0

I want to add a payment gateway to my OpenCart site. I have received the following code from my bank that is providing the gateway. The problem is, I don't know where or how to put it. Please can anyone help?

The code is as below:

<script type= "text/javascript"  src= "https://www.ubacipg.com/MerchantServices/UPaybutton.ashx?mercId=<merchant_id>&CurrencyC ode=<crr_code>"></script>  
<script type= "text/javascript" >
 upay_settings.setAmountField( '<amount_field_id>' );
 upay_settings.setOrderIdField( '<order_field_id>' );
 upay_settings.setProductField( '<product_field_id>' );
 upay_settings.setEmailField( '<customer_email_field_id>' );
</script>
shadyyx
  • 15,825
  • 6
  • 60
  • 95
Estherons
  • 11
  • 3
  • possible duplicate of [Payment Gateway integration in Opencart](http://stackoverflow.com/questions/11539803/payment-gateway-integration-in-opencart) – dipak_pusti Dec 25 '13 at 14:04

1 Answers1

0

Short answer: You have to put this code into the payment's type template.

Long answer: You would have to implement Your own payment type module - the best way for Your case is to start with copying (and renaming) of bank transfer payment module. You would have to copy and modify all the administration (backend) files as well as all the frontend (catalog) ones.

The frontend's controller should have at least two methods (You can look into other payment modules like PayPal, Amazon, eBay etc. that comes already with OC) - index for just displaying of the code above in Your question and confirm (or callback) for the response request from the bank (so that You could confirm or deny the order).

If You have some experience with OpenCart this shouldn't be a life killer...

shadyyx
  • 15,825
  • 6
  • 60
  • 95