Post by Aftab2021 » Fri May 07, 2021 11:45 pm

I have OC 3020. My payment processor is an unknown local company and they have given me following script for payment integration.

<script async="async" src="https://test.com/payment.js?seller=true" selleraccountcode="Your code" saleamount="amount" callback="callbackurl">
</script>

I cannot understand how to submit data to this script. I have called them and sent emails but they are always sending same script to use. It just shows a button when I use it. My understanding is that it is JS code which runs on client side only whereas PHP runs on server side. How they both can work?

Normally I should be able to post a form to any given URL but I am not sure how can I post form data to this script.

Newbie

Posts

Joined
Sun Apr 18, 2021 4:33 pm

Post by Cue4cheap » Sat May 08, 2021 12:57 am

This should be a question to them first. i.e. What do I do with that link? What are the fields? etc. Then you might need to hire a developer to build and integration to make it work with opencart.
Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Aftab2021 » Sat May 08, 2021 4:37 pm

Hi,

I have already developed a form by copying existing payment extensions. And it is passing correct values.

My question is that is it possible to submit form data to this URL that has been provided by payment processor? What I see, it just creates a button on my page.

Newbie

Posts

Joined
Sun Apr 18, 2021 4:33 pm

Post by ADD Creative » Sat May 08, 2021 6:40 pm

Without any documentation on your payment processor it hard to say. However, usually when you use a payment script the script will create an form for the payments details or take the customer to their site to enter the payment details there. This is usually to keep the PCI compliance requirement to a minimum.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Aftab2021 » Sat May 08, 2021 7:08 pm

Hi AddCreative

Is it possible to edit this script in OpenCart at run time and put sellerkey and other parameters in it so that once it is rendered, the button has all the required parameters with it? Sorry for noob questions but I am beginner in web development.

Newbie

Posts

Joined
Sun Apr 18, 2021 4:33 pm

Post by ADD Creative » Sun May 09, 2021 3:44 am

Yes, you can either build the script tag in the controller and set the whole tag to be used in the template. Or set the different variables and use in script tag in the template. Look at some other payment modules to see how it's done.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Mon May 10, 2021 7:02 pm

Aftab2021 wrote:
Fri May 07, 2021 11:45 pm
Normally I should be able to post a form to any given URL but I am not sure how can I post form data to this script.
Why?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: DesignCart and 101 guests