osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Worldpay currency problem (CAD & USD)

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



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Closed Thread

 

LinkBack Thread Tools
  #1  
Old 03-06-2009, 12:20 PM
New Member
 
Join Date: Feb 2009
Location: Toronto, Canada
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
abhishekgbc is on a distinguished road
Unhappy Worldpay currency problem (CAD & USD)

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 03-07-2009, 10:54 AM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 2,681
Thanks: 12
Thanked 214 Times in 196 Posts
Rep Power: 20
jpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud of
Default Re: Worldpay currency problem (CAD & USD)

Cause it does not pass currency type - Try find code:
PHP Code:
 tep_draw_hidden_field('hideCurrency''true') . 
Change to:
PHP Code:
 tep_draw_hidden_field('hideCurrency''false') . 
See if that works...
__________________
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 03-07-2009, 05:20 PM
New Member
 
Join Date: Feb 2009
Location: Toronto, Canada
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
abhishekgbc is on a distinguished road
Default Re: Worldpay currency problem (CAD & USD)

I couldn't find that piece of code anywhere in the application.

Could you please help me out here...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 03-07-2009, 06:04 PM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 2,681
Thanks: 12
Thanked 214 Times in 196 Posts
Rep Power: 20
jpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud of
Default Re: Worldpay currency problem (CAD & USD)

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 03-07-2009, 06:38 PM
New Member
 
Join Date: Feb 2009
Location: Toronto, Canada
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
abhishekgbc is on a distinguished road
Default Re: Worldpay currency problem (CAD & USD)

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');
}
}
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 03-07-2009, 06:44 PM
New Member
 
Join Date: Feb 2009
Location: Toronto, Canada
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
abhishekgbc is on a distinguished road
Default Re: Worldpay currency problem (CAD & USD)

Is this post related to my problem?

Currency Problems
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 03-09-2009, 10:29 AM
New Member
 
Join Date: Feb 2009
Location: Toronto, Canada
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
abhishekgbc is on a distinguished road
Smile Re: Worldpay currency problem (CAD & USD)

Problem solved.
Install the new Worldpay Junior module....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Tags
worldpay currency problem

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -8. The time now is 07:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design