Jump to content

How to add a payment javascript code in prestashop 1.5


Recommended Posts

 

 

Please i need help to add a payment javascript to my shop.

just wondering what kind of script you're trying to add... if you want to integrate your shop with some payment gateway i suppose that pasting script to header is not enough ;)

Link to comment
Share on other sites

Thanks

 

It is called diamond webpay, from a bank in my country. It will allow people to shop on my site with credit cards. They gave me a javascript snippet to add to the payment page of my website.

 

This is the code

 

<script type="text/javascript"

src="https://cipg.diamondbank.com/cipg/MerchantServices/UPaybutton.ashx?mercId=<merchant_id>">

</script>

upay_settings.setAmount(<amount>);

upay_settings.setOrderId(<order_id>);

upay_settings.setProduct(<product_name>);

upay_settings.setEmail(<customer_email>);

</script>

 

Please where do i add this? Or do i need to build a module for this?

 

 

Thanks

Link to comment
Share on other sites

Thanks so much Vekia.

 

I think they are the one handling the whole thing. Like when a customer places an order on my page and clicks on their pay icon, the site redirect the customer to the payment gateway, and they take it up from there. I believe this is how it it works.

Please do i need a module for this? Or do i just add the javascript snippet to my payment page? If the second option is what i am to do, how do i do it? Is it the payment order tpl or the order opc tpl? I just need your help.

 

Thanks.

Link to comment
Share on other sites

Thanks so much Vekia.


 


I think they are the one handling the whole thing. Like when a customer places an order on my page and clicks on their pay icon, the site redirect the customer to the payment gateway, and they take it up from there. I believe this is how it it works.


Please do i need a module for this? Or do i just add the javascript snippet to my payment page? If the second option is what i am to do, how do i do it? Is it the payment order tpl or the order opc tpl? I just need your help.


 


Thanks.

Link to comment
Share on other sites

yes, you need module for this.

 

instead of snippet you have to use full integration, orders then will be marked as "already paid" right after payment, 

with simple javascript, this payment method will not be even displayed as a payment option in your shop.

 

snippet is not enough.

Link to comment
Share on other sites

Thanks El Patron

 

It's a bank. And the gateway  is Upay in Nigeria. They said our shop will display the pay button, then when customer click on it, they will function as a middle man to display the 3 payment options(all cards), and handle the whole thing from there. 

 

Thanks

Link to comment
Share on other sites

×
×
  • Create New...