Online Payment Module Architecture: Difference between revisions

m
no edit summary
mNo edit summary
Tag: 2017 source edit
mNo edit summary
Tag: 2017 source edit
Line 53: Line 53:




= Step 2 - User choose the payment mode
= Step 2 - User choose the payment mode =


When the use choose a payment mode, the same page is called but with a parameter '''action=dopayment'''. If the payment mode needs to, some information about the payment are stored into session so it will be possible to retrieve them later when falling back on the result of payment page. Among information, the variable FULLTAG contains information on the source of payment (the mode but also the object of Dolibarr the payment may be related to). It must provided to the payment system because it is required to have it in the fallback URL used once a payment has been done (see STEP 4)
When the use choose a payment mode, the same page is called but with a parameter '''action=dopayment'''. If the payment mode needs to, some information about the payment are stored into session so it will be possible to retrieve them later when falling back on the result of payment page. Among information, the variable FULLTAG contains information on the source of payment (the mode but also the object of Dolibarr the payment may be related to). It must provided to the payment system because it is required to have it in the fallback URL used once a payment has been done (see STEP 4)
Line 60: Line 60:
Then the page show the form to enter the payment information (credit card number). The page may also choose to make a redirect to another page (on remote system) that ask this information.
Then the page show the form to enter the payment information (credit card number). The page may also choose to make a redirect to another page (on remote system) that ask this information.


= Step 3 - Entering payment information
= Step 3 - Entering payment information =


When the form to enter payment information are submitted (whatever is the page that handle it), the payment system should send a redirect to the page '''/public/payment/paymentok.php''' or '''public/payment/paymentko.php''' depending on status of payment.
When the form to enter payment information are submitted (whatever is the page that handle it), the payment system should send a redirect to the page '''/public/payment/paymentok.php''' or '''public/payment/paymentko.php''' depending on status of payment.


= Step 4 - Fallback on result page
= Step 4 - Fallback on result page =
When calling the page when payment is OK, the following parameters must also be provided:
When calling the page when payment is OK, the following parameters must also be provided:
* FULLTAG (this parameter was defined into the public/payment/newpayment.php page). With this parameter, the page paymentok.php will be able to make all complementary action like closing invoice or order or recording a subscription for a membership subscription, and more...
* FULLTAG (this parameter was defined into the public/payment/newpayment.php page). With this parameter, the page paymentok.php will be able to make all complementary action like closing invoice or order or recording a subscription for a membership subscription, and more...