X-Payments:PayPal REST API
Stores connected to X-Payments can be configured to use payment processing via PayPal REST API.
PayPal REST API Features
Other payment methods supported by X-Payments are listed in the section X-Payments: Payment gateways supported by X-Payments 3.1.
Configure PayPal REST API
Prerequisites:
- You need to have a PayPal Business account. You can sign up for one at paypal.com
- You need to have an account with X-Payments. X-Payments v1.x-3.x User Manual is available.
- Your X-Cart store needs to be connected to your X-Payments account. For X-Payments v1.x-3.x, the connection can be made using the X-Payments v1.x-3.x Connector add-on.
To configure PayPal REST API:
- Go to https://developer.paypal.com/developer/applications and log in to the Dashboard. This will get you to the "My Apps & Credentials" page.
- Depending on what you are going to do - test your checkout process or start real-life payment processing - you will need to choose an appropriate PayPal environment: Sandbox or Live.
- Choose to create a new app by clicking the Create App button.
Once the app has been created, you will get access to the API credentials and settings for it.
You will need the credentials to connect to X-Payments, so for now, keep the page open. - In a new browser tab or window, log in to your X-Payments admin panel. Navigate to Settings > Payment configurations.
The Payment Configurations page opens. - From the drop-down box, select PayPal REST API and click Add.
The "Add new payment configuration" page for PayPal REST API opens. - Provide the credentials for your PayPal app so X-Payments can connect to your PayPal account for payment processing. Also, specify your payment configuration preferences.
- Name: The text string entered here will be used as the name to identify the payment configuration in X-Payments admin panel and the Admin area of your X-Cart-based online store. You can keep the proposed name or choose to change it. For example, if you are going to have more than one payment configuration based on PayPal REST API payment integration - like to process payments in more than one currency - it is best to change the name so you can see which payment configuration you are dealing with without having to open its details. For example, you can use a name like "PayPal (REST API) - USD" to reflect the name of the currency that is going to be used for payments via this configuration.
- Client ID and Secret: Copy and paste these values from PayPal (from the page you have kept open in another tab of your browser).
- Test/Live mode: Whether you are using PayPal sandbox environment or production environment. The production environment is used for real payments (Live mode), whereas the sandbox environment is used for testing (Test mode).
- Initial transaction: The mode in which you want the payment transaction to be conducted when someone buys something at your online store: Auth (authorize the payment amount but not capture the funds yet) or Auth and capture (authorize and capture the payment amount at once).
- 3-D Secure mode: The payment gateway provides a built-in 3-D Secure service. You can specify how you want to use it. Two options are available:
Returns a 3-D Secure contingency when it is a mandate in the region where you operate;
Trigger 3-D Secure for every transaction, regardless of SCA requirements. - 3D Secure behavior: Two options are available:
Accept all transactions;
Accept transactions with possible liability shift to the card issuer. - Order prefix: Your trading name or any other prefix that will help you to identify a payment transaction as originating from this specific online store.
- Currency: The currencies in which you will be able to accept payments via the payment method based on this payment configuration. By default, this setting is pre-set to All supported (N), which means all the currencies supported by the payment gateway - with the number N specifying the number of currencies. To limit the range of currencies that will be accepted, click on the All supported (N) button, uncheck the Select all box - this will unselect all the selected currencies - and check the boxes for the currencies that you will accept. For the sake of example, we are creating a configuration that will support only the United States dollar; so here we need to disable all the currencies but USD.
- Credit card types: The credit card types you wish to accept via the payment method based on this payment configuration.
- Call-back IPs: IP addresses of the payment gateway's callback requests.
- Cancel not captured: Whether authorizations obtained for payments made in the "Auth" mode should be voided automatically within 30 days of payment if the capture of the funds has not been performed.
- In a new browser tab or window, log in to your X-Cart store Admin area. Use the admin menu to navigate to the Payment Methods page................