Jump to content

CCNOW Payment gateway update


Recommended Posts



It seems that Cubecart also update the gateway payments after upgrading the cubecart shopping cart?


Because we fixed manually the default CCNOW module, but after upgrading cubecart it doesnt work anymore.


Here is a fix in your current CCNOW module so that we CCNOW users doesnt get a corrupt shopping cart after upgrading.


Open: /public_html/modules/gateway/ccNow/gateway.class.php
'x_shipping_amount'             => (isset($this->_basket['shipping']['value'])) ? number_format($this->_basket['shipping']['value'], 2, '.', '') : '0.00',
change to:
// 'x_shipping_amount'             => (isset($this->_basket['shipping']['value'])) ? number_format($this->_basket['shipping']['value'], 2, '.', '') : '0.00',
Now CCNOW module works again. Please update this so that every release and updates of Cubecart will work with CCNOW.
Link to comment
Share on other sites



Could you please share the working ccNOW zip file?


We got many complains that the gaeway doesnt work.


I tried myself and when you select ccnow s gateway at step 3 durng the checkout process you will get a page error 500


The link in the module work find:https://www.ccnow.com/cgi-local/transact.cgi so the website is not down or something.


Please help us to get ccnow working in cubecart.



Link to comment
Share on other sites

  • 2 weeks later...



The module works and no errors, however we have the following problem.


Cubecart is showing all the checkout prices fine including shipping price.


When you go to the ccnow actual payment website it i smarked as FREE SHIPPING ???


So for each order we lose shipping costs.



Link to comment
Share on other sites

Because the shipping value has been passed though as 0 which is the only way we have been able to get the module to work. If the order was split down to items, subtotal, tax, shipping and discount then there its likely under some circumstances it won't add up and fail.


CubeCart handles line items and totals in a complex way. Sometimes they include tax sometimes they don't etc.. It's not possible for the order to be broken down to that level and sent to ccNow.  

Link to comment
Share on other sites

So it means we are not able to fix this and lose shipping cost for each order?


Its crazy because we are not a local shop with stock. We do dropshipping and all items come from Asia to Europe which cost us around 25 Euro shipping price! Customers pay 9.95 Euro (then we still lose 10 Euro shipping) now we lose 20 Euro for each order!


So this is technically not possible or is cubecart module not able to do it?


That really suck.

Link to comment
Share on other sites

It may be possible to put in the true shipping price and subtract that from the order total.  


$hidden = array(
'x_product_sku_0'  => $this->_basket['cart_order_id'],
'x_product_title_0'  => "CubeCart Order #".$this->_basket['cart_order_id'],
'x_product_quantity_0'  => 1,
'x_product_unitprice_0' => $this->_basket['total'],
'x_product_url_0'  => $GLOBALS['storeURL'],

'x_login' => $this->_module['acName'],
'x_version' => '1.0',
'x_fp_arg_list' => 'x_login^x_fp_arg_list^x_fp_sequence^x_amount^x_currency_code',
'x_fp_hash' => md5($this->_module['acName']."^x_login^x_fp_arg_list^x_fp_sequence^x_amount^x_currency_code^".$this->_basket['cart_order_id']."^".$this->_basket['total']."^".$GLOBALS['config']->get('config', 'default_currency')."^".$this->_module['actKey']),
'x_fp_sequence' => $this->_basket['cart_order_id'],
'x_currency_code' => $GLOBALS['config']->get('config', 'default_currency'),
'x_method' => ($this->_module['testMode']) ? 'TEST' : 'NONE',

'x_name' => $this->_basket['billing_address']['first_name']." ".$this->_basket['billing_address']['last_name'],
'x_address' => $this->_basket['billing_address']['line1'],
'x_address2' => $this->_basket['billing_address']['line2'],
'x_city' => $this->_basket['billing_address']['town'],
'x_state' => $this->_basket['billing_address']['state'],
'x_zip' => $this->_basket['billing_address']['postcode'],
'x_country' => $this->_basket['billing_address']['country_iso'],
'x_phone' => $this->_basket['billing_address']['phone'],
'x_email' => $this->_basket['billing_address']['email'],

'x_ship_to_name' => $this->_basket['delivery_address']['first_name']." ".$this->_basket['billing_address']['last_name'],
'x_ship_to_address' => $this->_basket['delivery_address']['line1'],
'x_ship_to_address2' => $this->_basket['delivery_address']['line2'],
'x_ship_to_city' => $this->_basket['delivery_address']['town'],
'x_ship_to_state' => $this->_basket['delivery_address']['state'],
'x_ship_to_zip' => $this->_basket['delivery_address']['postcode'],
'x_ship_to_country' => $this->_basket['delivery_address']['country_iso'],

'x_invoice_num' => $this->_basket['cart_order_id'],
'x_instructions' => $this->_basket['comments'],
'x_amount' => ($this->_basket['total']-$this->_basket['shipping']['value']),
'x_shipping_amount' => $this->_basket['shipping']['value'],
'x_discount_amount'  => '',
'x_discount_label'  => '',
I think you will now find the order total is wrong. ccNow is the only module we have had this issue with. 
Link to comment
Share on other sites

How about leave the ccnow module as it is, but make a small script to change the price in cubecart?


like when the user is selecting ccnow as payment gateway cubecart on page automaticly add shipping price to total price and hide the shipping price.


Then when the user is hitting checkout user come to ccnow page with total pricc which is (cubecart total price + shipping)

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

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

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