PostProcessPayment metod Post a "form" to third party url (3.20)

6 years ago

I'm using "PostProcessPayment" metod for my payment module.

The metod prepare a html document like this:


<body onload="document.form1.submit()">

<form name="form1" method="Post" action="" >
<input name="cartnumber" type="hidden" value="012345678952146">
<input name="exprdatemount" type="hidden" value="05">
<input name="exprdateyear" type="hidden" value="2016">
<input name="successurl" type="hidden" value="">
<input name="errorurl" type="hidden" value="">
...................some hidden field about payment............


I want to post this data to third party bank url and the bank server return succsess or error.

How can I post this data?
6 years ago
Look at the sample code of Nop.Plugin.Payments.GoogleCheckout how they implement IPayment. You will need to write a plugin for payment gateway.
6 years ago
Another good example of a payment plugin that posts details to a third-party site is the SagePay plugin (includes the source code as well).