|
|
|
@ -300,18 +300,18 @@ function DirectPayment($paymentType, $paymentAmount, $creditCardType, $creditCar |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
function MassPayment(array $beneficiaries, $currencyCode) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$nvpstr = "&RECEIVERTYPE=EmailAddress"; |
|
|
|
|
$nvpstr .= "&CURRENCYCODE=".$currencyCode; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$index = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($beneficiaries as $beneficiary) { |
|
|
|
|
$nvpstr .= "&L_EMAIL".$index."=".$beneficiary['paypal_account']; |
|
|
|
|
$nvpstr .= "&L_AMT".$index."=".$beneficiary['commission']; |
|
|
|
|
$index++; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$resArray = hash_call("MassPay", $nvpstr); |
|
|
|
|
|
|
|
|
|
return $resArray; |
|
|
|
@ -337,8 +337,8 @@ function hash_call($methodName, $nvpStr) |
|
|
|
|
curl_setopt($ch, CURLOPT_URL, $API_Endpoint); |
|
|
|
|
curl_setopt($ch, CURLOPT_VERBOSE, 1); |
|
|
|
|
//turning off the server and peer verification(TrustManager Concept). |
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); |
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); |
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); |
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); |
|
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
|
|
|
curl_setopt($ch, CURLOPT_POST, 1); |
|
|
|
|
|
|
|
|
|