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

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 298
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 228
Adaptive Payments Developer Guide August 7, 2012 229
Refund API Operation
Refund Examples Using NVP and CURL
Refund 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.
Using the payment key to refund an entire payment
In this example, the caller of the Refund API operation specifies a payment key. The total
amount from each receiver is refunded to the sender.
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:
curl -s --insecure
-H "X-PAYPAL-SECURITY-USERID: api_username"
-H "X-PAYPAL-SECURITY-PASSWORD: api_password"
-H "X-PAYPAL-SECURITY-SIGNATURE: api_signature"
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV"
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV
-H "X-PAYPAL-APPLICATION-ID: your_app_id "
https://svcs.sandbox.paypal.com/AdaptivePayments/Refund -d
"requestEnvelope.errorLanguage=en_US
&payKey=AP-95V43510SV018561T"
Response:
Vista de página 228
1 2 ... 224 225 226 227 228 229 230 231 232 233 234 ... 297 298

Comentários a estes Manuais

Sem comentários