Knowledge BasePayment Methods and PSP Gateway Introduction

Payment Methods and PSP Gateway Introduction

External Payment Flow

There are a few possible flows that a payment can take in the case of an external payment module. These flows and the status that can result from them are described below.
 
Successful payment - Confirm before ok page
  • User is redirected to the PSP
  • User pays for his order at the PSP
  • Confirm page is called by the PSP
    • Basked is deleted
    • Order mail will be send
    • Stock will be deducted
    • User will be redirected to the ok page (ordersubmit.aspx); this page will have no actions
Payment status will be 'Paid / In progress'
 
Successful payment - ok page before confirm
  • User is redirected to the PSP
  • User pays for his order at the PSP
  • Basket is deleted
  • Order mail will be send
    • User will be redirected to the ok page;
    • Confirm page is called by the PSP
  • Stock will be deducted
Payment status will be 'Paid / In progress'
 
Failed payment - Without Confirm
  • User is redirected to the PSP
  • User cancels order or an error occurred
  • User is redirected to the failure page
  • Note:  this is an exceptional case were the PSP is not working or wrongly configured. In normal cases confirm page is called

Payment status will be 'New'

 
Failed payment - With Confirm before failed page
  • User is redirected to the PSP
  • User cancels order or an error occurred
  • Confirm page is called with failure status; this status is mapped to the 'cancelled' status in Commerce
  • User is redirected to the failure page

Payment status will be 'Cancelled', basket remains intact and no mail is send.

  
Failed payment - With Confirm after failed page
  •  User is redirected to the PSP
  • User cancels order or an error occurred
  • User is redirected to the failure page
  • Confirm page is called with 'failure' status; this status is mapped to the cancelled status in Commerce

Payment status will be 'Cancelled', basket remains intact and no mail is send.

 
  
Started payment - User cancels payment
  • User is redirected to the PSP
  • User cancels order
  • Confirm page is called with 'failure' status; this status is mapped to the 'cancelled' status in Commerce. (not shown in image)
  • User is redirected to the failure page
Payment status will be 'Cancelled', basket remains intact and no mail is send.
 
Started payment - User closes browser at PSP
  •  User is redirected to the PSP
  • User closes browser and leaves PSP
Payment status will be 'New', basket remains intact and no mail is send.
  
Successful payment - Confirm page not called!
 
This is a rare case if the PSP provider stopped working or the confirm page does not work in this case the status of the order will remain 'New' till the confirm page will be back online. If it is back online the call to the confirm page will be repeated.
  
Successful payment - But Ok Page not called (browser hangs)
  • User is redirected to the PSP
  • User closes browser and leaves PSP
  • Request will be made to confirm
  • Status will be set to 'Paid'
 
 
 
 
These flows are generally the same for each PSP. When creating a custom implementation of a payment service provider you need to be sure to keep all these possible flows in account.
 
Knowledge BasePayment Methods and PSP Gateway Introduction