Developer forum

Forum » Development » Payment retry on a failed order

Payment retry on a failed order

Alexandru Aliu
Reply

Hey guys,

On my project I need to give users the posibility to retry a payment on some orders . What is the best approach to do this? The context is like this:

- the orders are completed, but capture state is Not Captured

- Users should have a link in "My account > Orders list" that will send them to a new page where the payment form will be loaded 

Any suggestion will be appreciated :-) 

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

I Alexandru

I am not sure I understand your request.

Normally a payment has 2 steps - and Authorization of the amount and then when the order is sent for delivery, a capture is made for the amount (or less) of the authorization.

So if the capture has not completed, it is a job for the administrator.

Not all payment providers in DW supports capturing from within Dynamicweb.

You might also have a setup where authorisation and capture is handled in one go.

Usually you cannot complete an order if you cannot authorize the payment during checkout.

So - can you explain more about how things work in your end - and what payment provider you are thinking of using?

Thanks, Nicolai

 
Alexandru Aliu
Reply

Hey Nicolai, 

The scenario is this: we have implemented a reccurent payment system and sometimes the cards expire. Our client wants a link that will allow the user to update the card info - in order to do that we need to create a payment and update the order with new data that we get from the payment gateway 

The easiest way we found is to create a custom page that will get ?orderid=OREDER1 and this page should show the updatecard form. Since I don't know to much about custom pages in DW , I can't figure out how to do some backend stuff , before rendering the template 

What I did:

- created a custom item

- created a NotificationSubscriber

What I don't know how to do:

- which events should I use

- how exactley to send data from the subscriber to the Template :-/

Note: My idea is that in the subscriber to make a call to NETS so I can get the paymentId and send that to the Razor when it renders. This is necesary in order to load the Payment Form from NETS

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Alexandru,

 

Just to give you some ideas, we have some of these requirements every now and again. We built something a bit more envolving though:

  • We added the ability to add cards within the Customer center
    • We created a custom app to handle these requests
    • We also had to customize/extend the necessary checkout handler
  • We updated the Cards Lists (Customer Center) to display the orders associated with each card
  • We added the possibility to reassign the card of a particular order
    • Mostly recurring order templates

 

So the architecture/UX is a bit different than yours. We point the user to their orders (or recurring orders) and give them the ability to re-assign a card (if the payment hasn't been captured)

 

Alternatively they can go through Saved Cards list and add new cards, and then reassign them.

 

Our work was very custom, so it would take additional effort. and likely hard to share what we did, but thought I'd share so we can all benefit from more ideas for a better final result.

This was for Rapido sites, so even if I were to share anything, the templates would have to be fully rebuilt.

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum