Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

add cart contents to linkpoint payment form field


mrjones

Recommended Posts

I'm using the LinkPoint Basic Payment contribution, and need to add a few hidden fields to pass to LinkPoint, for when their server times out and doesn't redirect my customers back to checkout_process.php. I want to pass the cart contents and order number, but can't figure out how to add it in. Current code example:

 

    function process_button() {

     global $HTTP_SERVER_VARS, $CardNumber, $order, $customer_id;



     $process_button_string = tep_draw_hidden_field('cardnumber', $this->cc_card_number) .

               tep_draw_hidden_field('expmonth', $this->cc_expiry_month) .

   tep_draw_hidden_field('expyear', $this->cc_expiry_year) .

   //NEED TO GET: cctype

   tep_draw_hidden_field('cctype', $this->cc_type) .

               tep_draw_hidden_field('chargetotal', number_format($order->info['total'], 2)) .

               // NEED TO GET : subtotal tax & shipping charges

   // number_format($total_cost + $total_tax + $shipping_cost, 2)

   //tep_draw_hidden_field('shipping', number_format($shipping_cost,2)) .

   //tep_draw_hidden_field('tax', number_format($total_tax,2)) .

   tep_draw_hidden_field('customerid', $customer_id) .

   tep_draw_hidden_field('userid', $customer_id) .

               tep_draw_hidden_field('x_Email_Customer', (MODULE_PAYMENT_LINKPOINTBASIC_EMAIL == '1'? 'TRUE': 'FALSE')) .

               tep_draw_hidden_field('x_Email_Merchant', (MODULE_PAYMENT_LINKPOINTBASIC_EMAIL_MERCHANT == '1'? 'TRUE': 'FALSE')) .

               tep_draw_hidden_field('bname', $order->billing['firstname'] . ' ' . $order->billing['lastname']) .

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

   tep_draw_hidden_field('baddr2', $order->delivery['suburb']) .

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

 

Where is says userid above, I want to pass the order number and not the customer number, and then I'd like to pass the cart contents in another field. Any ideas how I can do this? Do I have to add extra variables to the global line at the top?

 

Thanks!

MrJones

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...