How to implement the PostProcessPayment method to redirect users to a third-party site

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hello,
I am developing my custom payment plugin on  3.8. The goal is to redirect the user to the wari site so that he can complete the payment. After reading the documentation, I understood that I needed to implement the PostProcessPayment method in my wariwebPaymentProcessor class.
Currently I have everything I need to access the wari site (Merchant, url ...), I really try to imitate several examples that I saw on the forums nop unfortunately I do not understand always nothing. So can someone clear me on the subject? if so, how could I implement this method as simply as possible to redirect my users to the third party site.

And also, what method I must implement to receive the identifiers (token, code succes, code error etc ...) that the wari returns me

Here is the third party website URL (wari)
https://www.wariglobalpay.com/testpayementws


And the method

public void PostProcessPayment(PostProcessPaymentRequest postProcessPaymentRequest)
        {
            RedirectToWariWebModel model = new RedirectToWariWebModel();
            model.OrderGuid = postProcessPaymentRequest.Order.OrderGuid;
            _httpContext.Response.RedirectToRoute("Plugin.Payments.WariWeb.RedirectInfo", model);
        }
5 years ago
You probably want to take a look at how the PayPalStandard plugin works

See the file nopCommerce_3.80_Source\Plugins\Nop.Plugin.Payments.PayPalStandard\PayPalStandardPaymentProcessor.cs

In the routine
         public void PostProcessPayment(PostProcessPaymentRequest postProcessPaymentRequest)

It does a redirect to third party website            
         _httpContext.Response.Redirect(builder.ToString());

When completed the routes for the re-entry are defined in
         nopCommerce_3.80_Source\Plugins\Nop.Plugin.Payments.PayPalStandard\RouteProvider.cs
5 years ago
Yidna wrote:
You probably want to take a look at how the PayPalStandard plugin works

See the file nopCommerce_3.80_Source\Plugins\Nop.Plugin.Payments.PayPalStandard\PayPalStandardPaymentProcessor.cs

In the routine
         public void PostProcessPayment(PostProcessPaymentRequest postProcessPaymentRequest)

It does a redirect to third party website            
         _httpContext.Response.Redirect(builder.ToString());

When completed the routes for the re-entry are defined in
         nopCommerce_3.80_Source\Plugins\Nop.Plugin.Payments.PayPalStandard\RouteProvider.cs


Thank you for the answer.
Can you give me a role of each of the two methods IPNHanler and PDhandler, I want to know what is the method that is called when the payment is successful and when there is a failure for the PayPalStandart plugin?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.