¿Cómo escribir un complemento de pago para nopCommerce que redirige al usuario a la página de pago del banco?
Frecuentes
Visto 2,219 veces
1
i am going to write a nopCommerce payment plugin that must redirect user to bank's payment page.i know that i have to implement IPaymentMethod
interface, but i have no idea where to write the logic for redirecting user to payment page and where i should receive the response.
Se agradece mucho cualquier ayuda.
EDIT:
for sake of clearness :
public void PostProcessPayment(PostProcessPaymentRequest postProcessPaymentRequest)
{
}
public CapturePaymentResult Capture(CapturePaymentRequest capturePaymentRequest)
{
return new CapturePaymentResult();
}
public ProcessPaymentResult ProcessPayment(ProcessPaymentRequest processPaymentRequest)
{
return new ProcessPaymentResult();
}
what are these methods?who call them?and when?
2 Respuestas
0
what are these methods?
These methods are from IPayment interface.
who call them?
checkout control process called IPayment ProcessPayment method.
¿y cuando?
On OnePageCheckout control sets it when you choose payment method at checkout.
Respondido 31 ago 13, 19:08
0
Generally for any Payment gateways what happens is that a post request is sent to them using a form which is there standard i.e. PayPal would have there own CCavenue would have there own.With these post form there is a optional filed which you can send as redirect url. After completion of the users payment the bank sends the users back to the redirect url which would be your site.
What I tend to do is append a query string to the url so that I can know for which transactions this url is being sent.
Respondido 25 ago 12, 07:08
Can you more specific about your doubt. - Nikshep
how to specify which controller action is responsible for getting response from the bank's site? - Behnam Esmaili
If you are using mvc asp.net then it is easy make a new action which takes transaction id as your parameter so the url which you would send to the bank would be something like www.xyz.com/payment/confirm/transactionid. - Nikshep
my question is not "how?" is "where?" - Behnam Esmaili
If you have an API or are calling a web service api all banks usually have a redirect URL as a property which you send to the bank so that answers the where for different banks you might need to send different data for that you have to check the bank document. - Nikshep
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas asp.net-mvc c#-4.0 nopcommerce or haz tu propia pregunta.
thanks for response.i have solved my problem already but i will mark it as answer. - Behnam Esmaili