masterunix Posted November 13, 2013 Share Posted November 13, 2013 Hello, 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 find: '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. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted November 13, 2013 Share Posted November 13, 2013 I believe this has been fixed on the latest 5.2.4 release. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 13, 2013 Share Posted November 13, 2013 I'll have to disagree, unless Devellion released a "tweaked" CC524 more than a week after the official release. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted November 13, 2013 Share Posted November 13, 2013 This code was submit to GitHub on October the 16th. Brian is right this was after the 5.2.4 release which means it will reach the next version. Quote Link to comment Share on other sites More sharing options...
masterunix Posted November 18, 2013 Author Share Posted November 18, 2013 Hello, 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. Thanks! Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted November 18, 2013 Share Posted November 18, 2013 I think Al meant for you to comment out/delete the large pink block and add line 87, so you could use it now. Quote Link to comment Share on other sites More sharing options...
masterunix Posted November 18, 2013 Author Share Posted November 18, 2013 Ah yes thank you DB. I changed it according to the screenshot and now it is working again! Hopefully now it will work a longer time Thanks for your help. Quote Link to comment Share on other sites More sharing options...
masterunix Posted November 28, 2013 Author Share Posted November 28, 2013 Hello, 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. Why? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted November 28, 2013 Share Posted November 28, 2013 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. Quote Link to comment Share on other sites More sharing options...
masterunix Posted November 28, 2013 Author Share Posted November 28, 2013 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. Quote Link to comment Share on other sites More sharing options...
masterunix Posted November 28, 2013 Author Share Posted November 28, 2013 How about make a script like this: if customer choose ccnow as payment option during checkout in cubecart then cubecart add shipping price to total price ? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted November 28, 2013 Share Posted November 28, 2013 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. Quote Link to comment Share on other sites More sharing options...
masterunix Posted November 28, 2013 Author Share Posted November 28, 2013 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) Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted December 16, 2013 Share Posted December 16, 2013 I don't think that would be good practise. We have always had problems with the ccNow integration on all version of CubeCart past and present. Their integration requirements are too strict to their own specification compared to all others. Quote Link to comment 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.