I use paypal api for billing again. I want to update the plan price using paypal api. for this i use
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_URL, 'https://api-3t.sandbox.paypal.com/nvp');
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query(array(
'USER' => 'ddsds_da_api',
'PWD' => '123412432134',
'SIGNATURE' => 'sgdsdshds',
'METHOD' => 'UpdateRecurringPaymentsProfile',
'VERSION' => '108',
'PROFILEID' => 'I-FYYMDB55ADSH',
'NOTE' => 'Uma nota opcional, explicando o motivo da mudanรงa',
'AMT' => 120,
'CURRENCYCODE' => 'BRL'
)));
$response = curl_exec($curl);
curl_close($curl);
$nvp = array();
if (preg_match_all('/(?<name>[^\=]+)\=(?<value>[^&]+)&?/', $response, $matches)) {
foreach ($matches['name'] as $offset => $name) {
$nvp[$name] = urldecode($matches['value'][$offset]);
}
}
print_r($nvp);
But I get this error . Subscription profiles not supported by recurring payment APIs. . Here is my mistake.
<pre>Array
(
[PROFILEID] => I-FYYMDB55ADSH
[TIMESTAMP] => 2015-03-16T15:48:07Z
[CORRELATIONID] => 33216e1739dde
[ACK] => Failure
[VERSION] => 76.0
[BUILD] => 15735246
[L_ERRORCODE0] => 11592
[L_SHORTMESSAGE0] => Subscription Profiles not supported.
[L_LONGMESSAGE0] => Subscription Profiles not supported by Recurring Payment APIs.
[L_SEVERITYCODE0] => Error
)
Please let me know what I did wrong.
source
share