Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal integration...


florins

Recommended Posts

Posted

In "./includes/modules/payment/paypal.php" find the paragraph containing:

 

$process_button_string =

tep_draw_hidden_field('cmd', '_xclick') .

tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .

tep_draw_hidden_field('item_name', STORE_NAME) .

tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('currency_code', $my_currency) .

tep_draw_hidden_field('night_phone_a', $order->customer['telephone']) .

tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .

tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

 

... and replace it with:

 

$process_button_string =

tep_draw_hidden_field('cmd', '_ext-enter') .

tep_draw_hidden_field('redirect_cmd', '_xclick') .

tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .

tep_draw_hidden_field('item_name', STORE_NAME) .

tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('currency_code', $my_currency) .

tep_draw_hidden_field('first_name', $order->customer['firstname']) .

tep_draw_hidden_field('last_name', $order->customer['lastname']) .

tep_draw_hidden_field('address1', $order->customer['street_address']) .

tep_draw_hidden_field('city', $order->customer['city']) .

tep_draw_hidden_field('state', $order->customer['state']) .

tep_draw_hidden_field('zip', $order->customer['postcode']) .

tep_draw_hidden_field('country', $order->customer['country']['iso_code_2']) .

tep_draw_hidden_field('email', $order->customer['email_address']) .

tep_draw_hidden_field('night_phone_a', $order->customer['telephone']) .

tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .

tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));

 

Wish you good luck,

Florin

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...