Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Posts
    9
    Plugin Contributions
    0

    Default secure trading problem, help needed

    we have used zencart for over 1 year for our website with secure trading with version 1.2.

    we have alway used 3 diffrent currency, zencart passed over the currency to securetrading useing there module which carried over the currency type and the amount.

    however we decided to upgrade to verision 1.3 and now the when the amount is passed over to secure trading it converts amount back to the defalt currency "if somone was paying $12 in version 1.2 it would come to payment page as $12 now it comes to payment page as £8"

    woundered if anyone eles as had this problem and fixed it i may be missing somthing simple normaly the case with me.

    Thanks in advances

  2. #2
    Join Date
    Mar 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: secure trading problem, help needed

    more info on the problem,

    this is where i think the problem is.

    this is off the securetrading payment module page.

    there is one big diffrence in the data that is passed over.

    v 1.2

    zen_draw_hidden_field('inputamount', number_format(($order->info['total']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

    v 1.3

    zen_draw_hidden_field('inputamount', round($order->info['total'],2)).

    this looks to me as being very importent.

    i have tryed exchanging the lines of code and also just adding the currency part of the code.

    the only effect this as had is to pass an amount uncoverted to the payment moduel

    i.e with that change now when somone buys something for $12 they would come to payment page and it would be £12.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: secure trading problem, help needed

    I haven't researched the module. But based on what you reported above, I suspect that you also need to send the currency code (not just 'inputamount'); otherwise it's just assuming a default.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Mar 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: secure trading problem, help needed

    mmm, i think this may be the line of code that does that the problem may be here then.

    zen_draw_hidden_field('currency', $currency) .

    i will post up the fullsection to allow everyone to get a better feel.

    $process_button_string = zen_draw_hidden_field('cmd', 'click') .
    zen_draw_hidden_field('merchant', 'xxxxxxxx') .
    zen_draw_hidden_field('merchant', 'xxxxxxxx') .
    zen_draw_hidden_field('merchantemail', 'xxxxxxxxxxxx') .//the email address you want the notifications of transactions sent to.
    zen_draw_hidden_field('orderref', $order_id) .
    zen_draw_hidden_field('currency', $currency) .
    zen_draw_hidden_field('customerid', $customer_id) .
    zen_draw_hidden_field('inputamount', round($order->info['total'],2)).
    zen_draw_hidden_field('name', $order->billing['firstname'].' '.$order- >billing['lastname']) .
    zen_draw_hidden_field('address', $order->billing['street_address'] . ', ' .$order->customer['suburb']) .//you can remove the suburb statement if you only want to show first line of address
    zen_draw_hidden_field('zenid',zen_session_id()) .
    zen_draw_hidden_field('town', $order->billing['city']) .
    zen_draw_hidden_field('county',$order->billing['state']) .
    zen_draw_hidden_field('country',$order->billing['country']['title']) .
    zen_draw_hidden_field('postcode', $order->billing['postcode']).
    zen_draw_hidden_field('telephone',$order->customer['telephone']) .
    zen_draw_hidden_field('email', $order->customer['email_address']) .
    zen_draw_hidden_field('customeremail', '1') .
    zen_draw_hidden_field('callbackurl','1') .
    zen_draw_hidden_field('cancelurl', zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'))
    ;

  5. #5
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: secure trading problem, help needed

    Assuming $currency is correct (vs $my_currency which you mentioned earlier), these should be fine:
    Code:
    zen_draw_hidden_field('currency', $currency) .
    zen_draw_hidden_field('inputamount', round($order->info['total'],2)).
    That simply submits the $currency value (which one would assume has been set a few lines earlier to be the value of either the currency code associated with $_SESSION['currency'] or the $order->info['currency'] .. whether GBP or USD etc, and submits the order amount which is based on the value of the order in the currency in which the customer placed the order.

    You might try changing $currency to $order->info['currency'] instead ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Mar 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: secure trading problem, help needed

    we have big progress on this thank wish i had asked here sooner.

    for people who have this problem you need to add the line of code

    $currency = $_SESSION['currency'];

    for

    zen_draw_hidden_field('currency', $currency) .

    to work

    however i am not out the woods yet although it is taking currency over i now can't get it to stop it from converting it.

    so if somone order $12 they get to payment page and it comes up as $8 dollers i think the problem is in this line of code.

    zen_draw_hidden_field('inputamount', round($order->info['total'],2)) .



    thanks again this so proves a when you have a problem outside input can make it very easy solultion

 

 

Similar Threads

  1. secure trading mod problem
    By Nick1973 in forum Addon Payment Modules
    Replies: 1
    Last Post: 25 May 2012, 02:47 PM
  2. Secure Trading customising
    By JaminT in forum Addon Payment Modules
    Replies: 6
    Last Post: 11 Jul 2011, 06:25 PM
  3. Secure Trading Call Back
    By leenug in forum Addon Payment Modules
    Replies: 2
    Last Post: 23 Mar 2010, 12:14 PM
  4. Secure Trading Module
    By pickledshark in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 14 Aug 2006, 07:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg