YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Button manager API BMUpdateButton Options
rging
#1 Posted : Thursday, November 24, 2011 5:27:52 PM
Rank: Starting Member

Groups: Registered

Joined: 11/24/2011
Posts: 1
Location: SoCal
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
Sponsor  
 
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.157 seconds.