View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007422 | module PayPal Checkout | module PayPal checkout - sub | public | 2023-02-20 18:56 | 2023-05-10 15:06 |
Reporter | Steven | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 2.2.2 / 1.2.2 | ||||
Fixed in Version | 2.3.0 / 1.3.0 | ||||
Summary | 0007422: Same state/county IDs may lead to wrong display on PayPal page | ||||
Description | The PayPal Checkout module does not check correctly for fitting state. It uses only the state ID from the address data, which may result in a different return than expected. The oxstates table uses OXID and OXCOUNTRYID as the primary key. The OXID is same as the actual state ID. When adding additional states, like the british counties, there may be doubled OXIDs. This is no problem for the database and the shop itself also seems to handle it correctly, but the PayPal module just checks for OXID and not for OXCOUNTRYID. This can lead to the case that a wrong state is displayed on the PayPal page. | ||||
Steps To Reproduce | - Add at least two entries with same OXID to your oxstates table. Assuming a standard installation, you should have Canadian province Saskatchewan (SK) already in your database. Then also add british county Suffolk (OXID = SK, OXCOUNTRYID = a7c40f632a0804ab5.18804076, OXTITLE = Suffolk, OXISOALPHA2 = SK). - Create a user with address including state Suffolk. - Do an order using PayPal with this user. - While on PayPal page, you see Saskatchewan instead of Suffolk as an address. If this does not work, try different way around: User from Saskatchewan and then you probably see Suffolk on PayPal page. Usually first one from database is used. | ||||
Additional Information | It happens in several places in the module's code, but one example is in OxidSolutionCatalysts\PayPal\Core\OrderRequestFactory::getShippingAddress: $state = oxNew(State::class); $state->load($deliveryAddress->getFieldData('oxstateid')); Assuming aboves example, the result for loading a State model with OXID "SK" may return different data sets. | ||||
Tags | No tags attached. | ||||