Hi,
Has anyone gotten the BMUpdateButton method to work through NVP interface? I have scoured the web and have only seen one search result that looked promising, but the site is down. I'm trying to update the amount on a hosted button, but always get an error message saying the BUTTONTYPE is invalid. I can change the method to BMGetButtonDetails and I get a valid response, so the credentials and HOSTEDBUTTONID are correct.
Here is my curl setup:
$METHOD=urlencode("BMUpdateButton");
$HOSTEDBUTTONID=urlencode("redacted");
$BUTTONTYPE=urlencode("BUYNOW");
$L_BUTTONVAR0=urlencode("AMOUNT=".number_format($_POST["systemSettingValue"],2));
// Set up your API credentials, PayPal end point, and API version.
$API_UserName = urlencode('redacted');
$API_Password = urlencode('redacted');
$API_Signature = urlencode('redacted');
$API_Endpoint = "https://api-3t.paypal.com/nvp";
$version = urlencode('65.1');
$NVP="HOSTEDBUTTONID=$HOSTEDBUTTONID&BUTTONTYPE=$BUTTONTYPE&L_BUTTONVAR0=$L_BUTTONVAR0";
// Set the curl parameters.
//removed - but this part is working
// Set the API operation, version, and API signature in the request.
$nvpreq = "METHOD=$METHOD&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature&$NVP";
// Set the request as a POST FIELD for curl.
curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);
// Get response from the server.
$httpResponse = curl_exec($ch);
Thanks in advance for your help,
Roger