PayPal Adaptive Payments - 2012 Guia do Utilizador Página 69

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 298
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 68
Adaptive Payments Developer Guide August 7, 2012 69
Getting Started
Making a Simple Payment (JSON)
HTTP Headers for Application and Device identification
Making a Simple Payment (JSON)
A simple payment is when a sender (whose account is debited) sends a payment (amount and
currency) to a single receiver (whose account is credited).
You send a PayRequest message to PayPal
You receive a response with a pay key.
You must redirect the senders browser to PayPal to approve the payment.
Pay Request for Simple Payment
{"returnUrl":"http://example.com/returnURL.htm", \
"requestEnvelope":{"errorLanguage":"en_US"},"currencyCode":"USD", \
"receiverList":{"receiver":[{"email":"david@example.com", \
"amount":"10.00",}]},"cancelUrl":"http://example.com/cancelURL.htm",\
"actionType":"PAY"}
Pay Response for Simple Payment
{"responseEnvelope":\
{"timestamp":"2009-10-06T14:30:39.383-07:00","ack":"Success",\
"correlationId":"cfe8f8783f1d3","build":"DEV"},\
"payKey":"AP-17266198048308436","paymentExecStatus":"CREATED"}
The response includes a pay key, which is a token you use in subsequent calls to Adaptive
Payments APIs to identify this particular payment.
Header Description
X-PAYPAL-APPLICATION-ID (Required) Your application’s identification, which is issued
by PayPal.
NOTE: Check X.com for which application ID must be
defined for working in the sandbox.
X-PAYPAL-DEVICE-ID (Optional) Client’s device ID, such as a mobile device’s
IMEI number or a web browser cookie.
X-PAYPAL-DEVICE-IPADDRESS (Required) Client’s IP address.
X-PAYPAL-SERVICE-VERSION (Optional) The version of an API operation to use. By
default, PayPal executes a request with the current version
of an API operation.
NOTE: PayPal recommends not specifying a version unless
it is absolutely required.
Vista de página 68
1 2 ... 64 65 66 67 68 69 70 71 72 73 74 ... 297 298

Comentários a estes Manuais

Sem comentários