Kohn Posted March 20, 2004 Share Posted March 20, 2004 Hi Everyone, We are using Oscommerce 2.2MS2 with Payflowlink. Whenever a customer places an order using PayFlowlink we run into a problem. If the customer registered an account with address say located in Alabama, and then actually has a billing address is New York, when PayFlowLink validates the address with VeriSign, it uses the default address, instead of the billing address (and often times returns an error). How can we change the code so that the validation uses the billing address instead the default primary address? I figure the code needed to be changed is here but I am not sure how to modify it. Any help would be greatly appreciate? function process_button() { global $HTTP_POST_VARS, $HTTP_SERVER_VARS, $CardName, $CardNumber, $total_cost, $total_tax, $shipping_cost, $customer_id, $sendto; $customer_query = tep_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_street_address, ab.entry_city, ab.entry_country_id, ab.entry_zone_id, ab.entry_state, ab.entry_postcode from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " ab on c.customers_default_address_id = ab.address_book_id and c.customers_id = ab.customers_id where c.customers_id = '" . $customer_id . "'"); $customer_values = tep_db_fetch_array($customer_query); $delivery_query = tep_db_query("select ab.entry_firstname, ab.entry_lastname, ab.entry_street_address, ab.entry_city, ab.entry_country_id, ab.entry_zone_id, ab.entry_state, ab.entry_postcode from " . TABLE_ADDRESS_BOOK . " ab where ab.address_book_id = '" . $sendto . "' and ab.customers_id = '" . $customer_id . "'"); $delivery_values = tep_db_fetch_array($delivery_query); $process_button_string = tep_draw_hidden_field('LOGIN',MODULE_PAYMENT_PAYFLOWLINK_LOGIN) . tep_draw_hidden_field('PARTNER',MODULE_PAYMENT_PAYFLOWLINK_PARTNER) . tep_draw_hidden_field('TYPE',MODULE_PAYMENT_PAYFLOWLINK_TYPE) . tep_draw_hidden_field('EXPDATE', $HTTP_POST_VARS['payflowlink_cc_expires_month'] . $HTTP_POST_VARS['payflowlink_cc_expires_year']) . tep_draw_hidden_field('AMOUNT', ($total_cost + $total_tax + $shipping_cost), 2) . tep_draw_hidden_field('SHIPAMOUNT', number_format($shipping_cost, 2)) . tep_draw_hidden_field('TAX', number_format($total_tax, 2)) . tep_draw_hidden_field('CARDNUM', $CardNumber) . tep_draw_hidden_field('NAME', $customer_values['customers_firstname'] . ' ' . $customer_values['customers_lastname']) . tep_draw_hidden_field('ADDRESS', $customer_values['entry_street_address']) . tep_draw_hidden_field('CITY', $customer_values['entry_city']) . Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.