Custom payment method development for 3ds credit card payment screen

один год назад
Hi there,
I use nopcommerce 4.50 source code .

I want to make custom payment method its credit card payment method(not redirection) with my local POS provider, i have actually already finished code. Its work with internal page "PaymentInfo.cshtml" its include internal credit card input and validation process.

When i click  Confirm button in Confirm order page code work with ProcessPaymentAsync method,  It's good because i dont like redirection method , its not stable and not seem good for customers.

But i have issue with 3DS work. Normally i make standard payment(without 3ds payment) code in ProcessPaymentAsync method. Its work perfect and i see order complate screen. But some credit cards not work without 3ds payment...

Main issue is:
I need new screen or invoke some elements in PaymentInfo.cshtml for call 3ds payment page in page(maybe i use iframe element), and need collect callback function values from 3ds payment result.

I have a route(in RegisterRoutes) and controller for listen callback requests. But controller is not return to order complate screen, its seem stuck this Confirm Order screen :



Where should I put the 3ds checkout screen? Into Confirm Order or Payment Information?
один год назад
Actually i need Process
7-)3ds confirm page
один год назад
I think it needs to be modal popup on the Order Confirm page.  May this will give you some ideas
https://stripe.com/docs/payments/3d-secure
один год назад
Thank you,
yes popup window method its work but its not stable, i just need 3ds payment page in OPC page. Maybe in <iframe> tag. I have html response from payment provider(like Stripe). I need to show this html on same page and page need wait to 3ds result for payment==paid or payment==pending
один год назад
It does not really work to put the payment and 3DS inline and then drop back to press a button to complete the order.
What happens if there is an issue after payment made or the user does not click the button, etc
Then you have a payment with no order.

Two ways to deal with this
i.e. Use the current which is to not go there and use redirection after order is created
The second is to do the payment then 3DS then automatically create the order after payment i.e. don’t return to the standard workflow and just create the order then display completed view

Only if there is problem with the payment or 3DS not entered and payment is not made you can return to the standard checkout workflow and repeat the above.
один год назад
Yidna wrote:
It does not really work to put the payment and 3DS inline and then drop back to press a button to complete the order.
What happens if there is an issue after payment made or the user does not click the button, etc
Then you have a payment with no order.

Two ways to deal with this
i.e. Use the current which is to not go there and use redirection after order is created
The second is to do the payment then 3DS then automatically create the order after payment i.e. don’t return to the standard workflow and just create the order then display completed view

Only if there is problem with the payment or 3DS not entered and payment is not made you can return to the standard checkout workflow and repeat the above.

Thank you very much for your answer!

So which payment method i need to use it? Standard or redirection?
один год назад
and The second is to do the payment then 3DS then automatically create the order after payment i.e. don’t return to the standard workflow and just create the order then display completed view for this method i need to bypass standard process, how to do it?
один год назад
So i suppose i need to bypass ConfirmOrder Action
for avoid order create before the payment
3 месяца назад
In process payment method create the order and set the status of the payment pending then in this method of the plugin
c Task PostProcessPaymentAsync(PostProcessPaymentRequest postProcessPaymentRequest)
       Redirect to 3DS URL.
And once the 3DS finished it will Redirect you back to any URl where you can verify the payment status.
3 месяца назад
I assume as  that each Payment gateway has a status check API and some of them has Webhook that send notifications to your Web.