如何将资金来源更改为信用卡(Paypal Payouts API)

时间:2019-04-27 19:26:02

标签: php paypal

还有其他方法可以将资金来源从Paypal余额更改为信用卡吗?

我要求Paypal支持(1周前),但没有答案

$unik = uniqid();
$token = "TOKEN_HERE";
$item_id = mt_rand(9999999, 999999999);
$randd = rand(1,100);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://api.sandbox.paypal.com/v1/payments/payouts');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"sender_batch_header\":{\"sender_batch_id\":\"$unik\",\"email_subject\":\"Anda memiliki pembayaran!\",\"email_message\":\"Anda telah menerima pembayaran! Terima kasih telah menggunakan layanan kami!\"},\"items\":[{\"recipient_type\":\"EMAIL\",\"amount\":{\"value\":\"1.$randd\",\"currency\":\"USD\"},\"note\":\"Terima kasih atas kepercayaan Anda!\",\"sender_item_id\":\"$item_id\",\"receiver\":\"$item_id@gmail.com\"}]}");
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/json';
$headers[] = "Authorization: Bearer $token";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
print_r($result);

有可能做到吗?

0 个答案:

没有答案