This is a discussion on Worldpay currency problem (CAD & USD) within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; My worldpay module is installed and running. but... there is a big problem. The amount being transferred is incorrect when ...
| |||||||
| Register | FAQ | Donate | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| My worldpay module is installed and running. but... there is a big problem. The amount being transferred is incorrect when the currency is changed. My website has two currencies - USD $ and CAD $. Default is USD. When the customer purchases using USD as the currency(example: USD $240 worth products) , oscmax passes correct amount to the worldpay in USD (i.e. USD $@240) Now I purchase the same products using CAD as currency. oscmax shows correct CAD (310$) but passes to worldpay CAD $240. This is the same amount that is in USD $ for the same product. Please help, I have spent hours and hours in forums searching for an answer. |
|
#2
| ||||
| ||||
| Cause it does not pass currency type - Try find code: PHP Code: PHP Code:
__________________ JPF - osCMax Fourm Moderator - To contact, post on the forum or click here Try out our osCMax at: Live Catalog Demo Limited access Admin: Live Admin Demo Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped! |
|
#3
| |||
| |||
| I couldn't find that piece of code anywhere in the application. Could you please help me out here... |
|
#4
| ||||
| ||||
| Then which Worldpay module are you using then? There is no default one in osCommerce -and the one I used is the one in osCMax....
__________________ JPF - osCMax Fourm Moderator - To contact, post on the forum or click here Try out our osCMax at: Live Catalog Demo Limited access Admin: Live Admin Demo Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped! |
|
#5
| |||
| |||
| I don't know. I just clicked install in the Payment modules of the admin section. Here is the code I have in my Worldpay.php <?php /* $Id: worldpay.php,v4.1 Beta 2003/01/12 22:00:00 Author : Graeme Simms (gsimms@icon.co.za)/Graeme Conkie (graeme@conkie.net) Title: WorldPay Payment Module V4.0 Beta osCommerce, Open Source E-Commerce Solutions osCommerce, Open Source Online Shop E-Commerce Solutions Copyright (c) 2002 osCommerce Released under the GNU General Public License */ class worldpay { var $code, $title, $description, $enabled; // class constructor function worldpay() { $this->code = 'worldpay'; $this->title = MODULE_PAYMENT_WORLDPAY_TEXT_TITLE; $this->description = MODULE_PAYMENT_WORLDPAY_TEXT_DESCRIPTION; $this->enabled = ((MODULE_PAYMENT_WORLDPAY_STATUS == 'True') ? true : false); $this->form_action_url = 'https://select.worldpay.com/wcc/purchase'; } // class methods function javascript_validation() { return false; } function selection() { return array('id' => $this->code, 'module' => $this->title); } function pre_confirmation_check() { return false; } function confirmation() { return false; } function process_button() { global $HTTP_POST_VARS, $shipping_cost, $total_cost, $shipping_selected, $shipping_method, $currencies, $currency, $customer_id , $order; $worldpay_url = tep_session_name() . '=' . tep_session_id() ; $process_button_string = tep_draw_hidden_field('instId', MODULE_PAYMENT_WORLDPAY_ID) . tep_draw_hidden_field('currency', $currency) . tep_draw_hidden_field('desc', 'Purchase from '.STORE_NAME) . tep_draw_hidden_field('cartId', STORE_NAME.' : '.$order->customer['firstname'].' '.$order->customer['lastname']) . tep_draw_hidden_field('amount', number_format($order->info['total'],2,'.','')); if (MODULE_PAYMENT_WORLDPAY_USEPREAUTH == 'True') $process_button_string .= tep_draw_hidden_field('authMode', MODULE_PAYMENT_WORLDPAY_PREAUTH); if (MODULE_PAYMENT_WORLDPAY_USEPREAUTH == 'True') $process_button_string .= tep_draw_hidden_field(MODULE_PAYMENT_WORLDPAY_PREA UTHACCID, MODULE_PAYMENT_WORLDPAY_PREAUTHID); $address = htmlspecialchars($order->customer['street_address'] . ' ' . $order->customer['suburb'] . ' ' . $order->customer['city'] . ' ' . $order->customer['state'], ENT_QUOTES); $process_button_string .= tep_draw_hidden_field('testMode', MODULE_PAYMENT_WORLDPAY_MODE) . tep_draw_hidden_field('name', $order->customer['firstname'] . ' ' . $order->customer['lastname']) . tep_draw_hidden_field('address', $address) . tep_draw_hidden_field('postcode', $order->customer['postcode']) . tep_draw_hidden_field('country', $order->customer['country']['iso_code_2']) . tep_draw_hidden_field('tel', $order->customer['telephone']) . tep_draw_hidden_field('fax', $order->customer['fax']) . tep_draw_hidden_field('email', $order->customer['email_address']) ; return $process_button_string ; } function before_process() { global $HTTP_POST_VARS; } function after_process() { return false; } function output_error() { return false; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_WORLDPAY_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable WorldPay Module', 'MODULE_PAYMENT_WORLDPAY_STATUS', 'True', 'Do you want to accept WorldPay payments?', '6', '1', 'tep_cfg_select_option(array('True', 'False'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Worldpay Installation ID', 'MODULE_PAYMENT_WORLDPAY_ID', '00000', 'Your WorldPay Select Junior ID', '6', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Mode', 'MODULE_PAYMENT_WORLDPAY_MODE', '100', 'The mode you are working in (100 = Test Mode Accept, 101 = Test Mode Decline, 0 = Live', '6', '3', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_PAYMENT_WORLDPAY_STATUS', 'MODULE_PAYMENT_WORLDPAY_ID','MODULE_PAYMENT_WORLD PAY_MODE'); } } ?> |
|
#6
| |||
| |||
| |
|
#7
| |||
| |||
| Problem solved. Install the new Worldpay Junior module.... |
![]() |
| Tags |
| worldpay currency problem |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Worldpay 4.0 - V1.0 | michael_s | New osCommerce Contributions | 0 | 09-09-2008 06:00 AM |
| worldpay module problem | hrhstephen | osCMax v2 Customization/Mods | 1 | 06-08-2006 04:30 AM |
| New currency "problem" | damnedpig | osCMax v1.7 Discussion | 3 | 08-24-2005 07:04 AM |
| Small Currency Problem | energeeuk | osCommerce 2.2 Modification Help | 1 | 09-02-2004 04:57 AM |
| Worldpay Help | Waza04 | osCommerce 2.2 Modification Help | 2 | 02-25-2003 10:20 AM |