Can someone help me understanding this PayPal sample code:

loginname

Regular Member
Joined
Oct 1, 2008
Messages
406
Reaction score
14
Hey

Below is some sample code taken from PayPal.com (mass payment). I'm unsure if I should use mass payment like this (put text in a file) or if I should use PayPal API methods to generate this output

Also, this I assume is PHP code: (correct me if I'm wrong)
curl -v -X POST https://api.sandbox.paypal.com/v1/payments/payouts \
Not sure what is happening here but is that the content of the file is posted to https://api.sandbox.paypal.com/v1/payments/payouts \ ??

curl -v -X POST https://api.sandbox.paypal.com/v1/payments/payouts \
-H "Content-Type: application/json" \
-H "Authorization: Bearer Access-Token" \
-d '{
"sender_batch_header": {
"sender_batch_id": "2014021801",
"email_subject": "You have a payout!",
"email_message": "You have received a payout! Thanks for using our service!"
},
rest of sample code removed


If you have some sample code on how to implement mass payment, I would be happy if you could share share it with me. Just a little bit whould be great. I'm banging my head against the wall while reading the PayPal doc and trying to make sample code work..... :)
 
Good some of you helped me move it to the correct place
 
First of all the „code“ in your thread is not any specific programming language it is a simple command that can be executed on the shell of a Unix system. The command „curl“ does a simple http request (in this case with a post parameter).
If you want to test such request you could try the tool „postman“.
You will need to add according header information like an auth. token.
 
Back
Top