Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

At PayPal I have Swedish Krona (as my main), Canadian Dollar, US Dollar and Euro.

In my osCommerce I have Euro, Norwegian Krona, Swedish Krona and US Dollar.

 

Today and yesterday I have had a couple of customers chose to pay with Euro. One customer's totalt was 52.69 EURO and when I checked my PayPal it had gone through as 574 EURO! I got my calculator out and saw that this was the amount that should've been charged if it charged in Swedish Krona, so it had converted the number to Swedish Krona but not the currency.

 

I tried it myself with both Euro and USD and the same thing happened.

 

I haven't noticed this with Norwegian crown - maybe cause it's not represented in my PayPal?

 

I have now removed all my other currencies at PayPal hoping that it will work, but since I have already swiped my VISA card three times to test it now gets declined :(

 

What do you think causes this? I would love to have more than one currency in my PayPal account, but osCommerce sends the request to PayPal with the numbers converted but not the currency.

 

This was a test buy of 11.23 USD, and here is the error dump I received (of 93 which should've been SEK but is still USD):

 

 

In function: before_process() - Direct Payment

Did first contact attempt return error? Yes

---------------------------------------------------------------------

-------------------------------DP_DUMP-------------------------------

------------This is the information that was sent to PayPal----------

---------------------------------------------------------------------

DoDirectPaymentRequestType Object

(

[DoDirectPaymentRequestDetails] => DoDirectPaymentRequestDetailsType Object

(

[PaymentAction] => Sale

[PaymentDetails] => PaymentDetailsType Object

(

[OrderTotal] => BasicAmountType Object

(

[_value] => 93.00

[_charset] =>

[_elements] => Array

(

)

Posted

I tried my theory now, and it doesn't work. Even though I removed all currencies from PayPal it still sends too much money.

I'm gonna have to use only one currency, unless someone knows how to fix this.

Posted

Since it's only happening with CC and not PayPal Express I figure there's something in paypal_wwp.php missing.

 

I compared it with paypal_express.php and found this in the express file, I wonder if that's what makes it work?:

 

 

// format prices without currency formatting

function format_raw($number, $currency_code = '', $currency_value = '') {

global $currencies, $currency;

 

if (empty($currency_code) || !$this->is_set($currency_code)) {

$currency_code = $currency;

}

 

if (empty($currency_value) || !is_numeric($currency_value)) {

$currency_value = $currencies->currencies[$currency_code]['value'];

}

 

return number_format(tep_round($number * $currency_value, $currencies->currencies[$currency_code]['decimal_places']), $currencies->currencies[$currency_code]['decimal_places'], '.', '');

}

Posted (edited)

I don't know, but have you carefully checked all of your settings in your paypal profile?

Edited by Coopco
Posted

Yeah, and I even called them, and they of course blame it on osCommerce. And I don't think the problem is on their end, since it works with regular PayPal Express, just not CC.

 

Someone shops for 50 EURO, osCommerce converrts 50 EURO to 500 SEK, but sends it to PayPal as 500 EURO... So it should be any easy fix, I'm just not that good with PHP :P

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...