STEPS TO FOLLOW
To integrate the PayPal payment method into the HiPay Enterprise Payment Gateway, please follow these steps.
1. WHETHER YOU ARE IN STAGE OR PRODUCTION MODE, LOG IN TO YOUR PAYPAL ACCOUNT USING THE FOLLOWING URL:
You need to retrieve the following credentials (one set for your sandbox account, another set for your production account) and send them to your Account manager:
- PayPal account email address
- Client ID ⇒ https://developer.paypal.com/docs/api-basics/manage-apps/
- Secret ID ⇒ https://developer.paypal.com/docs/api-basics/manage-apps/
- Merchant ID ⇒ https://www.paypal.com/us/smarthelp/article/FAQ3850
-
SFTP Login ⇒ https://developer.paypal.com/docs/platforms/streamline-operations/sftp/ (Create SFTP account)
-
SFTP Password ⇒ https://developer.paypal.com/docs/platforms/streamline-operations/sftp/ (Create SFTP account)
Please note that you need to switch from live to sandbox account to find both set of credentials:
https://developer.paypal.com/docs/api-basics/sandbox/credentials/
2. SET UP WEBHOOKS.
https://developer.paypal.com/docs/api-basics/notifications/webhooks/rest/
- Enter one of the following URLs in the “webhooks” field:
STAGE ENVIRONMENT:
PRODUCTION ENVIRONMENT:
- https://secure-gateway.hipay-tpp.com/provider/paypal-checkout/webhook
- Select “All events” in the “Event types” section.
- Click on “Save”.
MANDATORY PARAMETERS FOR BILLING AND SHIPPING ADDRESSES
When making PayPal transactions, merchants must ask for a billing and a shipping address.
- The shipping address will only be sent to PayPal provided that a zip code, a city and a country have all been entered.
Thus, all three zipcode/city/country or shipto_zipcode/shipto_city/shipto_country parameters MUST BE SPECIFIED when creating orders.
Please note: when a shipping address is entered, PayPal checks the specified country.
If the country is on the list below, the merchant must ABSOLUTELY fill in the state or shipto_state parameter.
LIST OF COUNTRIES WITH STATES OR PROVINCES:
https://developer.paypal.com/docs/classic/api/state_codes/
Besides, the zip code and the city must be consistent with the specified state
(e.g.: state → TX, city → Houston, zipcode → 77056).
Otherwise, an error will be returned by PayPal.
- For the billing address, the city/shipto_city parameter is also mandatory.
Therefore, the billing address will only be sent to PayPal provided that a zip code, a city and a country have all been entered.
Example of request parameters
{
"email": "john.doe@hipay.com",
"phone": "0187654321",
"cid": "1234567",
"eci": "7",
"gender": "M",
"firstname": "john",
"lastname": "doe",
"birthdate": "19771215",
"streetaddress": "Rue de la Paix",
"zipcode": "75001",
"city": "Paris",
"state": "",
"country": "FR"
[…],
"payment_product": "paypal",
"orderid": "567abc0abc234",
"language": "fr_FR",
"country": "FR",
"amount": 250.50,
"shipto_gender": "M",
"shipto_firstname": "John",
"shipto_lastname": "Doe”,
"shipto_streetaddress": "Rue de la Paix",
"shipto_zipcode": "75001",
"shipto_city": "Paris",
"shipto_state": "",
"shipto_country": "FR",
}
Comentários
0 comentário
Artigo fechado para comentários.