0
我想執行付款從PAY_KEY到貝寶ID。下面是我的示例代碼:貝寶自適應付款 - 錯誤580023
$PayRequestFields = array(
'ActionType' => 'PAY',
'CancelURL' => $dataArray['cancel_url'],
'CurrencyCode' => $dataArray['currency'],
'FeesPayer' => 'SENDER',
'IPNNotificationURL' => '',
'Memo' => '',
'Pin' => $dataArray['pin'],
'PreapprovalKey' => $dataArray['sender_pre_approval_key'],
'ReturnURL' => $dataArray['return_url'],
'ReverseAllParallelPaymentsOnError' => '',
'SenderEmail' => '',
'TrackingID' => ''
);
$ClientDetailsFields = array(
'CustomerID' => '',
'CustomerType' => '',
'GeoLocation' => '',
'Model' => '',
'PartnerName' => ''
);
$FundingTypes = array('ECHECK', 'BALANCE', 'CREDITCARD');
$Receivers = array();
$Receiver = array(
'Amount' => $dataArray['primary_reciever_amount'],
'Email' => $dataArray['primary_reciever'],
'InvoiceID' => '',
'PaymentType' => 'SERVICE',
'PaymentSubType' => '',
'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => ''),
'Primary' => 'FALSE'
);
array_push($Receivers,$Receiver);
$SenderIdentifierFields = array(
'UseCredentials' => ''
);
$AccountIdentifierFields = array(
'Email' => '',
'Phone' => array('CountryCode' => '', 'PhoneNumber' => '', 'Extension' => '')
);
$PayPalRequestData = array(
'PayRequestFields' => $PayRequestFields,
'ClientDetailsFields' => $ClientDetailsFields,
//'FundingTypes' => $FundingTypes,
'Receivers' => $Receivers,
'SenderIdentifierFields' => $SenderIdentifierFields,
'AccountIdentifierFields' => $AccountIdentifierFields
);
$PayPalResult = $PayPal->Pay($PayPalRequestData);
當我執行這個代碼,獲得該說"The fee payer SENDER cannot be used with this preapproval"
錯誤"580023"
。
請指導我。
我從來沒有使用這個特定的接口或得到這個特別的消息,但它聽起來很清晰。聽起來好像有一些政策,對於這種預先批准,發件人不會被要求支付費用。更改該請求的參數並查看它是否有效。如果是這樣,你就沒有編程問題。如果你想知道爲什麼原始請求被認爲是無效的,那麼你應該問PayPal,而不是StackOverflow。 – geewiz