$BMUpdateButtonFields = array('hostedbuttonid' => '', 'buttoncode' => '', 'buttontype' => '', 'buttonsubtype' => '', 'buttonimage' => '', 'buttonimageurl' => '', 'buynowtext' => '', 'subscribetext' => '', 'buttoncountry' => '', 'buttonlanguage' => '');
/**
 * You may pass in any variables from the Standard Payments list.
 *
 * Depending on the type of button you are creating some variables will be required.
 * Refer to the HTML Standard Variable reference for more details on variables for specific button types.
 *
 * https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
 */
$BMButtonVars = array('notify_url' => '', 'amount' => '', 'discount_amount' => '', 'discount_amount2' => '', 'discount_rate' => '', 'discount_rate2' => '', 'discount_num' => '', 'item_name' => '', 'item_number' => '', 'quantity' => '', 'shipping' => '', 'shipping2' => '', 'handling' => '', 'tax' => '', 'tax_rate' => '', 'undefined_quantity' => '', 'weight' => '', 'weight_unit' => '', 'address_override' => '', 'currency_code' => '', 'custom' => '', 'invoice' => '', 'tax_cart' => '', 'handling_cart' => '', 'weight_cart' => '', 'add' => '', 'display' => '', 'upload' => '', 'business' => '', 'paymentaction' => '', 'shopping_url' => '', 'a1' => '', 'p1' => '', 't1' => '', 'a2' => '', 'p2' => '', 't2' => '', 'a3' => '', 'p3' => '', 't3' => '', 'src' => '', 'sra' => '', 'no_note' => '', 'modify' => '', 'usr_manage' => '', 'max_text' => '', 'set_customer_limit' => '', 'min_amount' => '', 'disp_tot' => '', 'page_style' => '', 'image_url' => '', 'cpp_cart_border_color' => '', 'cpp_header_image' => '', 'cpp_headerback_color' => '', 'cpp_headerborder_color' => '', 'cpp_logo_image' => '', 'cpp_payflow_color' => '', 'lc' => '', 'cn' => '', 'no_shipping' => '', 'return' => '', 'rm' => '', 'cbt' => '', 'cancel_return' => '', 'address1' => '', 'address2' => '', 'city' => '', 'state' => '', 'zip' => '', 'country' => '', 'email' => '', 'first_name' => '', 'last_name' => '', 'charset' => '', 'night_phone_a' => '', 'night_phone_b' => '', 'night_phone_c' => '');
/**
 * Button options are handled similar to order items in other calls within this library.
 * You will need to setup a nested array of options and option selections.
 *
 * You could end up with multiple $BMButtonOption arrays here, and each of those could
 * contain multiple $BMButtonOptionSelection arrays within it.  All are then passed into
 * the final $BMButtonOptions array that gets passed to the API.
 */
$BMButtonOptions = array();
$BMButtonOptionSelections = array();
$BMButtonOptionSelection = array('value' => '', 'price' => '', 'type' => '');
array_push($BMButtonOptionSelections, $BMButtonOptionSelection);
$BMButtonOption = array('name' => '', 'selections' => $BMButtonOptionSelections);
array_push($BMButtonOptions, $BMButtonOption);
$BMButtonOption = array('name' => 'Size', 'selections' => $BMButtonOptionSelections);
array_push($BMButtonOptions, $BMButtonOption);
$PayPalRequestData = array('BMUpdateButtonFields' => $BMUpdateButtonFields, 'BMButtonVars' => $BMButtonVars, 'BMButtonOptions' => $BMButtonOptions);
$PayPalResult = $PayPal->BMUpdateButton($PayPalRequestData);
// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);