
Adaptive Payments Developer Guide August 7, 2012 99
Pay API Operation
Pay Examples Using NVP and CURL
Pay Examples Using NVP and CURL
These examples all use NVP for the data binding and CURL to deliver the HTTP request to
the PayPal sandbox endpoint. Line breaks are provided for ease of reading; each CURL
command is a single line and each request and response is a string without line breaks or extra
whitespace.
Simple payment example
In this example, the sender makes a payment of $100 to a PayPal-registered receiver. If you
are the sender and the caller, the approval is implicit; otherwise, the sender must explicitly
approve the payment.
The status of the request, which is identified in the paymentExecStatus field of the
response, differs due to the kind of approval required. Implicit approval allows the request to
be completed immediately. Explicit approval allows the request to be created; however, it is
completed until the payment is approved.
NOTE: The sample code below uses the insecure setting to work around the certificate for
testing in a sandbox environment. For actual implementations, you must specify the
location of the certificate.
Request:
correlationId xs:string
Correlation identifier. It is a 13-character, alphanumeric string (for example,
db87c705a910e) that is used only by PayPal Merchant Technical Support.
NOTE: You must log and store this data for every response you receive.
PayPal Technical Support uses the information to assist with reported
issues.
timestamp xs:datetime
Date on which the response was sent, for example:
2012-04-02T22:33:35.774-07:00
NOTE: You must log and store this data for every response you receive.
PayPal Technical Support uses the information to assist with reported
issues.
Field Description
Comentarios a estos manuales