Ayojewel Posted March 31, 2014 Share Posted March 31, 2014 Hello Please i need help to add a payment javascript to my shop. I want to use a third party gateway, and my provider gave me a javascript snippet to add to my payment page. Please where and how do i do this? Thanks Link to comment Share on other sites More sharing options...
PrestaHeroes USA Posted March 31, 2014 Share Posted March 31, 2014 add this to themes/mytheme/header.tpl (first back up this file) <script type="text/javascript" src="URL OF SCRIPT"></script> in back office to enure that your .tpl change is picked up, you can set as shown in screen shot or simply click the clear cache button http://screencast.com/t/uigvUIwX9 Link to comment Share on other sites More sharing options...
vekia Posted March 31, 2014 Share Posted March 31, 2014 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 More sharing options...
PrestaHeroes USA Posted March 31, 2014 Share Posted March 31, 2014 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 I agree, their module (assuming there is one) should be adding the javascript following PrestaShop best practices. Link to comment Share on other sites More sharing options...
Ayojewel Posted March 31, 2014 Author Share Posted March 31, 2014 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 More sharing options...
vekia Posted March 31, 2014 Share Posted March 31, 2014 but this is some payment gateway? or just simple order tracking script? Link to comment Share on other sites More sharing options...
Ayojewel Posted March 31, 2014 Author Share Posted March 31, 2014 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 More sharing options...
Ayojewel Posted April 1, 2014 Author Share Posted April 1, 2014 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 More sharing options...
vekia Posted April 1, 2014 Share Posted April 1, 2014 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 More sharing options...
PrestaHeroes USA Posted April 1, 2014 Share Posted April 1, 2014 can you tell us what payment gateway is requesting you to do this...then maybe we can do some searches for you. Link to comment Share on other sites More sharing options...
Ayojewel Posted April 1, 2014 Author Share Posted April 1, 2014 Thanks Vekia How do i do this? I can't build a module, any help will do. Thanks Link to comment Share on other sites More sharing options...
Ayojewel Posted April 1, 2014 Author Share Posted April 1, 2014 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 More sharing options...
Recommended Posts