View Issue Details

IDProjectCategoryView StatusLast Update
0004693OXID eShop (all versions)1.03. Basket, checkout processpublic2023-11-16 16:48
Reporterfinnegan Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
PlatformLinux 
Product Version4.6.0 revision 44406 
Summary0004693: Wrong List of payment methods offered in Checkout - Bug 0002934 was closed but error persists
DescriptionBug 0002934 was closed due to non-reproducabilty.

Bug: The payment methods offered during Checkout depend on Delivery Address Country. This is WRONG - the country of the billing address should be predominant for payment choices.

Ex: Shop in Germany, Customer has a billing address in Austria but enters a delivery address in Germany. He is offered bank draft as a payment method which is wrong, since this works only with German customers.

We have the same problem (EE 4.3.2), so I investigated the code of Version 4.6.0.
The list of possible payment methods is generated in core/oxpaymentlist.
In this class the method

   public function getCountryId( $oUser )

is called for building SQL of the payment methods list. In this method you call

$oUser->getActiveCountry();

BUT in oxuser the "active country" is the one of the delivery address!

4.6.0:

 public function getActiveCountry()
00735 {
00736 $sDeliveryCountry = '';
00737 $soxAddressId = oxSession::getVar( 'deladrid' );
00738 if ( $soxAddressId ) {
00739 $oDelAddress = oxNew( 'oxaddress' );
00740 $oDelAddress->load( $soxAddressId );
00741 $sDeliveryCountry = $oDelAddress->oxaddress__oxcountryid->value;

.....

Steps To ReproduceSteps to reproduce in Demoshop:
1. put articles in cart, login and go to checkout.
2. set alternate delivery-address with this country: USA
3. the billing-country should be Germany
4. go to next step (payment)
5. As you can see, there are no payments available!
Additional InformationAlthough we have the problem with EE 4.3.2 the relevant code has not changed up to 4.6.0, as far as I can see.
It is unclear for me why you could not reproduce this behaviour. Maybe this has something to do with automatic usergroup adding of the current user? As far as I understand the code related user groups also work as a filter for selecting the possible payment methods during checkout.

Possible bugfix: oxpaymentlist::getCountryId()
...
if($oUser) {
  //$sCountryId = $oUser->getActiveCountry();
  $sCountryId = $oUser->oxuser__oxcountryid->value;
}
...
TagsDelivery, Payment
Attached Files
oxid1.png (48,564 bytes)   
oxid1.png (48,564 bytes)   
oxid2.png (66,807 bytes)   
oxid2.png (66,807 bytes)   
oxid3.png (44,918 bytes)   
oxid3.png (44,918 bytes)   
oxid4.png (28,926 bytes)   
oxid4.png (28,926 bytes)   
ThemeAll
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Relationships

has duplicate 0002934 resolvedsvetlana OXID eShop (all versions) Payment rules aren't correct if billing & delivery countries differ. 
has duplicate 0005248 closedsvetlana OXID eShop (all versions) Delivery address is used to display payment methods - should be payment address 
related to 0006097 closedflorian.auer module PayPal Visibility of paypal-paying-method should depend on billing-country, not alternate delivery-country!!! 

Activities

svetlana

2012-11-13 15:19

reporter   ~0007842

Reminder sent to: finnegan

Hi, unfortunately bu we still can not reproduce it. Could you please send us more information about how you reproduce it? As i understand for reproducing it we need:
1. all shipping cost rules are assigned to Germany and Austria.
2. payment method for example "Invoice" is assigned to Germany.
3. User with billing address Austria and shipping address Germany. And user can not see payment method "Invoice"
 

finnegan

2012-11-13 16:40

reporter   ~0007846

I checked again with your PE DEMO-Shop 4.7 and I WAS able to reproduce the problem after I played around with adding and removing user groups from the payment definition "Bankeinzug/Lastschrift" in Oxid admin.

So maybe the problem is related to specific user groups in the payment definition.
In our shops we do _not_ make use of user groups right now, so we added ALL groups to all payment definitions.

BUT if I exclude a country (like Austria) from a payments definition this exclusion should supersede all user group definitions.
And as I indicated in my bug report just looking at the code should make the problem clear.

Please check the attached screen shots from your demo shop I have taken some minutes ago.

JaroslavHerber

2015-03-19 11:42

reporter   ~0010813

Last edited: 2015-03-19 11:59

The priority of this bug should be high! It has nothing to do with user-groups.

Steps to reproduce in Demoshop:
1. put articles in cart, login and go to checkout.
2. set alternate delivery-address with this country: USA
3. the billing-country should be Germany
4. go to next step (payment)
5. As you can see, there are no payments available!

Reason: the delivery-address-country decides which payments are shown. And this is wrong. It should always be the billing-country - no matter if there is an alternate delivery-address! (Without the alternate delivery-address you will get payments correspoding to Germany.)

Possible bugfix: oxpaymentlist::getCountryId()
...
if($oUser) {
  //$sCountryId = $oUser->getActiveCountry();
  $sCountryId = $oUser->oxuser__oxcountryid->value;
}
...

Sven Brunk

2023-11-16 16:48

administrator   ~0015771

The case is a bit more complex, because there are payment methods where the delivery country is correct (every kind of payment at delivery time) and those cases where the payment is done independently.
I would agree though, that in most cases the payment is handled by the instance with the billing address (hence it is called like that)