STEPS TO FOLLOW
In order 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:
2. CLICK ON THE “DASHBOARD” TAB IN THE UPPER-RIGHT CORNER OF THE SCREEN.
3. STAY IN “MY APPS & CREDENTIALS” SECTION.
4. SCROLL DOWN AND CLICK ON “CREATE APP” TO GET NEW API CREDENTIALS TO CONNECT TO PAYPAL.
5. RETRIEVE YOUR “CLIENT ID” AND “SECRET” INFORMATION.
- Depending on the environment you want (stage or production), select “Sandbox” or “Live” and retrieve the following information.
a) Client ID
b) Secret
- Click on “Show”.
6. SET UP WEBHOOKS.
- Scroll down to the “SANDBOX WEBHOOKS” section.
- Click on “Add Webhook”.
- Enter one of the following URLs in the “Webhook Url” field.
STAGE ENVIRONMENT:
PRODUCTION ENVIRONMENT:
- Select “All events” in the “Event types” section.
- Click on “Save”.
7. SET UP IPN NOTIFICATIONS.
- Log in to your PayPal account on https://www.paypal.com.
- Click on “Profile” in the upper-right corner of the screen.
- Click on “Account Settings”.
- Click on “My selling tools”, then on “Update” for “Instant payment notifications”.
- Click on “Edit settings” and enter one of the following URLs in the “Notification URL” field.
STAGE ENVIRONMENT:
PRODUCTION ENVIRONMENT:
- Finally, click on “Receive IPN messages (Enabled)”, then on “Save” to commit all changes.
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",
}
Commentaires
0 commentaire
Cet article n'accepte pas de commentaires.