} // Address Override $customer = $log_in_manager->get_user(); $address = $customer->get_address(); $paypal_form->add_hidden_input('address_override', '1'); $paypal_form->add_hidden_input('first_name', $customer->get_first_name()); $paypal_form->add_hidden_input('last_name', $customer->get_last_name()); $paypal_form->add_hidden_input('address1', $address->get_street_address()); $paypal_form->add_hidden_input('city', $address->get_locality()); $paypal_form->add_hidden_input('zip', $address->get_postal_code()); $paypal_form->add_hidden_input('country', $address->get_country_name()); $paypal_submit_input = new HTMLTags_Input(); $paypal_submit_input->set_attribute_str('type', 'submit'); $paypal_submit_input->set_attribute_str('value', 'Go to PayPal'); $paypal_form->append_tag_to_content($paypal_submit_input); foreach ($paypal_form->get_hidden_inputs() as $hidden_input) { $paypal_form->append_tag_to_content($hidden_input); } $paypal_form_div->append_tag_to_content($paypal_form); /* * Example of address override */ // <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> // <input type="hidden" name="cmd" value="_xclick"> // <input type="hidden" name="business" value="*****@*****.**"> // <input type="hidden" name="item_name" value="Memorex 256MB Memory Stick"> // <input type="hidden" name="item_number" value="MEM32507725"> // <input type="hidden" name="amount" value="3"> // <input type="hidden" name="tax" value="1"> // <input type="hidden" name="quantity" value="1"> // <input type="hidden" name="no_note" value="1">
$protx_form_action = new HTMLTags_URL(); //$protx_form_action->set_file('https://ukvps.protx.com/vspgateway/service/vspform-register.vsp'); # The real thing //$protx_form_action->set_file('https://ukvpstest.protx.com/vspgateway/service/vspform-register.vsp'); # The sandbox $protx_form_action->set_file($strPurchaseURL); # The URL set above $protx_form->set_action($protx_form_action); $protx_form->set_attribute_str('method', 'POST'); $protx_form->add_hidden_input('VPSProtocol', '2.22'); $protx_form->add_hidden_input('TxType', $strTransactionType); $protx_form->add_hidden_input('Vendor', $strVSPVendorName); $protx_form->add_hidden_input('Crypt', $strCrypt); $protx_submit_input = new HTMLTags_Input(); $protx_submit_input->set_attribute_str('type', 'submit'); $protx_submit_input->set_attribute_str('value', 'Go to Secure Server'); $protx_form->append_tag_to_content($protx_submit_input); foreach ($protx_form->get_hidden_inputs() as $hidden_input) { $protx_form->append_tag_to_content($hidden_input); } $protx_form_div->append_tag_to_content($protx_form); /* * Example of ProTx Form */ //<form // action="https://ukvpstest.protx.com/vspgateway/service/vspform-register.vsp" // method="POST" id="VSPForm" name="VSPForm" // > // <input type="hidden" name="VPSProtocol" value="2.22"> // <input type="hidden" name="TxType" value="PAYMENT"> // <input type="hidden" name="Vendor" value="mash "> // <input type="hidden" name="Crypt" value=""> // <input type="submit" name="proceed" src="images/proceed.gif" value="Proceed to VSP Form registration">