Jump to content

Need Help Please Passing Information from 3rd party Shopping Cart to paypal


tan88

Recommended Posts

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.