tan88 Posted September 29, 2007 Share Posted September 29, 2007 Hello Everyone, I am new to php coding. Hope someone can help. I am using the checkout button from a third party shopping cart. I want to the button to pass all the variables (product name, quantity, amount, total amount etc...) from the shopping cart into the paypal table and also I want the button to do a loop until all items are in the paypal table. How do I approach that? Here's checkout button code current (it doesn't work): ******************************************************************************** $process_button_string = tep_draw_hidden_field('add', '1') . tep_draw_hidden_field('cmd', '_cart') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('products_name', $order->products['name']) . tep_draw_hidden_field('products_quantity', $order->products['qty']) . tep_draw_hidden_field('products_price', $order->products['price']) . tep_draw_hidden_field('amount', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) . tep_draw_hidden_field('first_name', $order->billing['firstname']) . tep_draw_hidden_field('last_name', $order->billing['lastname']) . tep_draw_hidden_field('address1', $order->billing['street_address']) . tep_draw_hidden_field('address2', $order->billing['suburb']) . tep_draw_hidden_field('city', $order->billing['city']) . tep_draw_hidden_field('state', $order->billing['state']) . tep_draw_hidden_field('zip', $order->billing['postcode']) . tep_draw_hidden_field('lc', $order->billing['country']['iso_code_2']) . tep_draw_hidden_field('email', $order->customer['email_address']) . 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('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('rm', '2') . tep_draw_hidden_field('no_note', '1') . tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); return $process_button_string; ******************************************************************************** Looking forward for an answer soon. Thank you in advance. Natalie Quote Link to comment https://forums.phpfreaks.com/topic/71187-need-help-please-passing-information-from-3rd-party-shopping-cart-to-paypal/ Share on other sites More sharing options...
rarebit Posted September 29, 2007 Share Posted September 29, 2007 Search paypal for IPN (Instant Payment Notification), make your own invoice from info (as you've shown), calculate a total, send info to paypal, let it reply, then you respond and verify, then output confirmation to user. As for your unnamed 'third party shopping cart', I dunno! Post on their forum (v slow) Quote Link to comment https://forums.phpfreaks.com/topic/71187-need-help-please-passing-information-from-3rd-party-shopping-cart-to-paypal/#findComment-358075 Share on other sites More sharing options...
tan88 Posted September 30, 2007 Author Share Posted September 30, 2007 I am using Oscommerce the shopping cart. Thank You. I'll check out paypal. Quote Link to comment https://forums.phpfreaks.com/topic/71187-need-help-please-passing-information-from-3rd-party-shopping-cart-to-paypal/#findComment-358169 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.