ereed28214 Posted May 4, 2005 Share Posted May 4, 2005 Please Help! Ok, I downloaded and installed the verisign cc module for my site. My site connects to verisign and everything. One problem though....say you order $3.35 from my site, verisign charges it as $335.00. Any one know why its doing this? Looks like the code might be multiplying by 100 to get 2 more decimals. Here is the code if anyone knows php or might know what the problem might be. I'm thinking it has to do with the * 100 but I changed it to 1 and it still came out as multiplying 100 according to verisign. This is the processing part of the code: $process_button_string = tep_draw_hidden_field('silent', '1') . tep_draw_hidden_field('trx_paymenttyp', 'cc') . tep_draw_hidden_field('trxuser_id', MODULE_PAYMENT_VERISIGN_LINK_USER_ID) . tep_draw_hidden_field('item_name', STORE_NAME) . tep_draw_hidden_field('trx_currency', $trx_currency) . tep_draw_hidden_field('trx_amount', number_format($order->info['total'] * 100 * $currencies->get_value($trx_currency), 0, '','')) . tep_draw_hidden_field('cc_expdate_month', $HTTP_POST_VARS['cc_via_verisign_cc_expires_month']) . tep_draw_hidden_field('cc_expdate_year', $HTTP_POST_VARS['cc_via_verisign_cc_expires_year']) . tep_draw_hidden_field('cc_number', $HTTP_POST_VARS['cc_via_verisign_cc_number']) . tep_draw_hidden_field('cc_checkcode', $HTTP_POST_VARS['cc_via_verisign_cc_checkcode']) . tep_draw_hidden_field('addr_name', $HTTP_POST_VARS['cc_via_verisign_cc_owner']) . tep_draw_hidden_field('addr_email', $order->customer['email_address']) . tep_draw_hidden_field('redirect_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true)) . tep_draw_hidden_field('silent_error_url', tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&cc_via_verisign_cc_owner=' . urlencode($HTTP_POST_VARS['cc_via_verisign_cc_owner']), 'SSL', true)); return $process_button_string; If anyone can help, thanks! Link to comment Share on other sites More sharing options...
seank123 Posted May 4, 2005 Share Posted May 4, 2005 Is it this: tep_draw_hidden_field('trx_amount', number_format($order->info['total'] * 100 * $currencies->get_value($trx_currency), 0, '','')) . ?? Link to comment Share on other sites More sharing options...
ereed28214 Posted May 4, 2005 Author Share Posted May 4, 2005 Is it this:?? <{POST_SNAPBACK}> I'm not even sure if that fixes the problem. I changed the 100 to 1 and verisign still charged it as $689.00 instead of $6.89 from my site. I'm thinking its the code in the module causing it to do this. Anyone know? Even verisign and my hosting site has no clue! Help! Link to comment Share on other sites More sharing options...
♥Vger Posted May 5, 2005 Share Posted May 5, 2005 Do orders processed not using Verisign come out at the correct price? If they do then it's a Verisign problem and you really need to get them to sort it out. If you use the Payment by Check module and the price is multiplying then check your default currency settings, and where it says 'Decimal Places' make sure that it says 2 Vger Link to comment Share on other sites More sharing options...
ereed28214 Posted May 5, 2005 Author Share Posted May 5, 2005 Do orders processed not using Verisign come out at the correct price? If they do then it's a Verisign problem and you really need to get them to sort it out. If you use the Payment by Check module and the price is multiplying then check your default currency settings, and where it says 'Decimal Places' make sure that it says 2 Vger <{POST_SNAPBACK}> The price comes out right in my Admin via Oscommerce and when I view orders whether its check or verisign. But verisign itself receives it as * 100 to the price and thats how much they will take out of the customer's bank. I'm still thinking its the verisign module I downloaded cause verisign said for me to check my pricing format and it wasn't coming from them.....but the price is right on my site and right in oscommerce when I view orders. Hmmmm.... Link to comment Share on other sites More sharing options...
boxtel Posted May 5, 2005 Share Posted May 5, 2005 The price comes out right in my Admin via Oscommerce and when I view orders whether its check or verisign. But verisign itself receives it as * 100 to the price and thats how much they will take out of the customer's bank. I'm still thinking its the verisign module I downloaded cause verisign said for me to check my pricing format and it wasn't coming from them.....but the price is right on my site and right in oscommerce when I view orders. Hmmmm.... <{POST_SNAPBACK}> if the charge in Verisign differs from what you have in OSC, check whether that format_number function outputs the correct format. OSC uses a different method I believe. So simply echo out the string value coming from that function. from php: string number_format ( float number [, int decimals [, string dec_point, string thousands_sep]] ) number_format() returns a formatted version of number. This function accepts either one, two or four parameters (not three): If only one parameter is given, number will be formatted without decimals, but with a comma (",") between every group of thousands. If two parameters are given, number will be formatted with decimals decimals with a dot (".") in front, and a comma (",") between every group of thousands. If all four parameters are given, number will be formatted with decimals decimals, dec_point instead of a dot (".") before the decimals and thousands_sep instead of a comma (",") between every group of thousands. Only the first character of thousands_sep is used. For example, if you use foo as thousands_sep on the number 1000, number_format() will return 1f000. Example 1. number_format() Example For instance, French notation usually use two decimals, comma (',') as decimal separator, and space (' ') as thousand separator. This is achieved with this line : <?php $number = 1234.56; // english notation (default) $english_format_number = number_format($number); // 1,234 // French notation $nombre_format_francais = number_format($number, 2, ',', ' '); // 1 234,56 $number = 1234.5678; // english notation without thousands seperator $english_format_number = number_format($number, 2, '.', ''); // 1234.57 ?> Treasurer MFC Link to comment Share on other sites More sharing options...
ereed28214 Posted May 6, 2005 Author Share Posted May 6, 2005 if the charge in Verisign differs from what you have in OSC, check whether that format_number function outputs the correct format. OSC uses a different method I believe. So simply echo out the string value coming from that function. from php: string number_format ( float number [, int decimals [, string dec_point, string thousands_sep]] ) number_format() returns a formatted version of number. This function accepts either one, two or four parameters (not three): If only one parameter is given, number will be formatted without decimals, but with a comma (",") between every group of thousands. If two parameters are given, number will be formatted with decimals decimals with a dot (".") in front, and a comma (",") between every group of thousands. If all four parameters are given, number will be formatted with decimals decimals, dec_point instead of a dot (".") before the decimals and thousands_sep instead of a comma (",") between every group of thousands. Only the first character of thousands_sep is used. For example, if you use foo as thousands_sep on the number 1000, number_format() will return 1f000. Example 1. number_format() Example For instance, French notation usually use two decimals, comma (',') as decimal separator, and space (' ') as thousand separator. This is achieved with this line : <?php $number = 1234.56; // english notation (default) $english_format_number = number_format($number); // 1,234 // French notation $nombre_format_francais = number_format($number, 2, ',', ' '); // 1 234,56 $number = 1234.5678; // english notation without thousands seperator $english_format_number = number_format($number, 2, '.', ''); // 1234.57 ?> <{POST_SNAPBACK}> I'm not sure where to change in the code since I'm not too familiar with php. Ok..I talked with verisign about my issue and they said it has to be oscommerce doing it. Basically on my site it shows $5.46 but verisign gets it as 546.00.......hmm.....I have no clue and I checked my USD currency and the decimal is at 2 places. Link to comment Share on other sites More sharing options...
teothekid Posted July 12, 2011 Share Posted July 12, 2011 Some sites (i'm working with ipayment.de now) use prices/numbers without a comma. The rule is that the last two digits from a number are decimals. ex.1 price of 13 $ must be transformed in 1300 $ ex.2 price of 12.67 is transformed in 1267 pay atention that the reponses from them use the same rule ! I hope it's not to late :P Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.