To add PayPal Checkout, you need to configure the settings on the payment gateway side and add the module in BILLmanager. The main difference from the "PayPal" payment method is that this gateway allows for refunds.
Configuring the payment method
To integrate the payment gateway with BILLmanager add a new application in PayPal:
- Authorize in PayPal client area.
- Go to the Dashboard → REST API apps → Create App. To set up the integration on the billing platform side, you will need the Client_ID and Secret fields.
Configuring BILLmanager
To create a payment module, enter Provider → Payment methods → click Add. The payment module adding wizard consists of the following steps:
- Select a payment methods: "PayPal Checkout".
- Integration settings. Specify the data for integration:
Activate the Add New Client option to display a link to register with the handler's system.
Complete the form using the details of an existing client in the handler's system:
- Application ID — unique identifier. To find the id, log into your PayPal client area → Dashboard → REST API apps → Client_ID;
- Secret key — application key to access API PayPal. To find the id, log into your PayPal client area → Dashboard → REST API apps → Secret ;
- Test mode — select the check box to activate a test mode for this payment method. You need to register a new account at developer.paypal.com ;
- Recurring payments — select the checkbox to enable recurring payments.
- Successful autopayment return page — the page to which customer is redirected after a successful payment. Use the BILLmanager page https://domain.com/billmgr?func=payment.recurring.success or an arbitrary page;
- Failed automatic payment return page — the age to which customer is redirected after a failed payment attempt. Use the BILLmanager page https://domain.com/billmgr?func=payment.recurring.fail or an arbitrary page.
- Payment method settings. Configure internal (within BILLmanager) parameters of the service payment module. For more details, see How to add a payment gateway module.
Additional information
Currencies
The following is a list of supported currencies. Read more PayPal documentation.
By default some currencies are not supported for the account. To accept payments in an unsupported currencies, log in to your PayPal account → Profile and settings → My selling tools → Payment receiving preferences → Payments sent to you in a currency you don't hold. Clear the check box if you want to manually approve the payments sent to you in a currency you don't hold.
Comission
A commission is charged for every finance operation that the service provider performs.
Refund
To enable refunds, navigate to Provider → Payment methods → Edit→ Allow refunds. You can refund only "Paid" payments.
Logging
PayPal Checkout has the following log files:
- /usr/local/mgr5/var/pmpaypalcheckout.log — log of payment method settings, refunds, payment by saved method;
- /usr/local/mgr5/var/ppcheckoutpayment.log — log of opening and interaction with the payment form;
- /usr/local/mgr5/var/ppcheckoutresult.log — log of payment execution after the user specified data on the payment form and clicked complete;
- /usr/local/mgr5/var/ppcheckoutrecurring.log — log of opening and interacting with the payment form when creating a saved payment method;
- /usr/local/mgr5/var/ppcheckoutrecurringresult.log — log of saving a payment method after the client has specified data on the payment form and clicked complete.
Possible issues with partial refunds
Partial refund may not be supported in the test mode. The log file contain the following information:
"name":"TRANSACTION_REFUSED","message":"Request was refused.You can not do a partial refund on this transaction","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"d4ac41412c103"
To resolve the issue, disable the payment verification option your PayPal client area:
- Log into PayPal developer account.
- Navigate to Sandbox accounts → Profile.
- In Settings disable the option Payment Review.