PayPal Adaptive Payment Api pre-populates user data

I am creating a website on which we are going to post events, and I would like USER A to be able to trigger an event - enter your PayPal account and set a price. Other users can then register for their event and pay USER A directly, without having to process their credit card. We would like users who do not have PayPal accounts to pay by credit card.

It seems that Paypal Adaptive Payment is the best API we use to achieve this. I work in a sandbox environment. My problem is that the user clicks to register for the USER A-event, then they enter all their information (name, address, company, etc.), We need to save this information in our database for this to be done primarily. Then they click on the button that says “Pay with Paypal”. This creates a paykey and redirects the user to the Paypal login page where the user has 2 options (a. Login paypal or b. Enter your personal information again and credit card information)

I want to know how I can complete all the fields already filled in on the Paypal page, so the user does not need to enter all his information again. They will be able to delete data in text fields if the billing address is different from another. But all the websites I have ever seen did not allow the user to enter this information twice if they are identical. Now I know that this is possible because I saw how other sites do this. I looked at the SetPaymentOptions API, but it’s not very clear how this works, and I need user information that will be transferred even if they are not already known by Paypal.

I tried adding values ​​as suggested in Paypal tutorials such as

          <INPUT TYPE="hidden" NAME="first_name" VALUE="John">
          <INPUT TYPE="hidden" NAME="last_name" VALUE="Doe">
          <INPUT TYPE="hidden" NAME="address1" VALUE="9 Elm Street">

but it didn’t work. Here is the source Fiddler data from the request:

   POST https://svcs.sandbox.paypal.com/AdaptivePayments/Pay HTTP/1.1
   Content-Type: text/xml;charset=utf-8
   X-PAYPAL-SECURITY-USERID: scotts_XXXXXXXXX_biz_api1.live.com
   X-PAYPAL-SECURITY-PASSWORD: 1344XXXXX
   X-PAYPAL-SECURITY-SIGNATURE: AOLbPDojAEUdeQJ3wXagJXkxYeJDARg4IXXXXXXXXXXXXXXXXXXX
   X-PAYPAL-SERVICE-VERSION: 1.1.0
   X-PAYPAL-APPLICATION-ID: APP-80W2844XXXXXXXXX
   X-PAYPAL-REQUEST-DATA-FORMAT: XML
   X-PAYPAL-RESPONSE-DATA-FORMAT: XML
   Host: svcs.sandbox.paypal.com
   Content-Length: 810
   Expect: 100-continue
   Connection: Keep-Alive
+5
source share
3

PayPal:

" - , . ."

, , - , , .

EDIT:

- , 100% - Express Payment API, , .

0

, , paypal , PayPal . api api-, .

PayPal , . PayPal api, PayPal, , .

, PayPal.


, - paypal , - PayPal : ( : login > accept).

:

  • ( , ) PayPal
  • (. api, paypal), returnUrl, URL- user_id
  • poppal popup URL, . PayPal, ( , ).
  • Paypal returnUrl 2, , " " js
  • .

:

  • "$ XX paypal "
  • , !

, !

+1

All Articles