31,034
edits
Tag: 2017 source edit |
Tag: 2017 source edit |
||
| Line 54: | Line 54: | ||
= Step 2 - User choose the payment mode = | = Step 2 - User choose the payment mode = | ||
When the | When the user 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) | |||
Depending on the payment mode, the page may prepare the payment on the remote system. It may be an API call or a redirect to another page. | |||
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. | ||
To save data of your choice in session or to make a redirect to the remote payment page, you must implement the hook '''doPayment''' in the context 'newpayment'. | |||
= Step 3 - Entering payment information = | = Step 3 - Entering payment information = | ||