I'd like to use Masspay method from Paypal API. I have an account for business in sandbox with balance more than I need to pay. So, I tried to make a cURL request for masspay, like this (just for test):
$url = "https://api-3t.sandbox.paypal.com/nvp";
$params = "METHOD=MassPay&VERSION=".urlencode("64.0")."¤cyID=".urlencode("GBP")."&RECEIVERTYPE=EmailAddress&".
"USER=".urlencode("stroke_1351502951_biz_api1.gmail.com")."&PWD=1351502971&SIGNATURE=".urlencode("AVtOG4sGbXNumu.aVFTqmP5CzdzZA-um-.BsYD-VZyNXmAeWkq1Jqf.S")."&".
"L_EMAIL0=".urlencode("stroke_1351584447_per@gmail.com")."&L_Amt0=".urlencode("3")."&".
"L_EMAIL1=".urlencode("stroke_1351584447_per@gmail.com")."&L_Amt1=".urlencode("1").
"&CURRENCYCODE=".urlencode("GBP");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
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);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
$result = curl_exec($ch);
curl_close($ch);
The result I was given is:
TIMESTAMP=2012-11-16T08:16:55Z&CORRELATIONID=dabb7bd62605b&ACK=Failure&VERSION=64.0&BUILD=4181146&L_ERRORCODE0=10321&L_SHORTMESSAGE0=Insufficient funds&L_LONGMESSAGE0=The account does not have sufficient funds to do this masspay&L_SEVERITYCODE0=Error
I have funds in two currencies: USD and EUR, when I make payment using them everything is good, but when I choose GBR, e.g. API tell's me that I've no sufficient funds. Looking for answer on x.com forum didn't bring me useful actual information. So the question is: Can I use a USD-account for Masspayment in EUR or other currecies or just in USD? And if it is possible, where should I set it?
Thanks.