View Issue Details

IDProjectCategoryView StatusLast Update
0007077module PayPalmodule PayPal - subpublic2020-03-12 13:49
Reportertmloberon Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.2.5 
Fixed in VersionPatch for 5.3 
Summary0007077: Shipping Methods will not found with PayPal Express
DescriptionShould the title, the shipping method, contain an umlaut. If this is no longer found, the order is given the shipping method 'oxidstandard'. Which is not desired.
Steps To Reproduce1. configure PayPal module with sandbox settings and activate PayPal Express.
2. create a new Shipping Methods
3. with title: "Lieferung Österreich"
4. then purchase with PayPal Express

Assert: Order must be completed with the shipping method: "Lieferung Österreich"
Additional InformationThe match does not work in this function:
 `\OxidEsales\PayPalModule\Controller\ExpressCheckoutDispatcher::extractShippingId()`

Line 521: `$name = trim(str_replace(\OxidEsales\Eshop\Core\Registry::getLang()->translateString("OEPAYPAL_PRICE"), "", $shippingOptionName));`

`$name === 'Lieferung Östereich'`

Line 527: `$deliverySetList = $this->makeUniqueNames($delSetList);`

`array_flip($deliverySetList) === ['Lieferung Östereich' => "dfaa45ef7733d41420012046e1ae6e8c"]`

Line 533: `$result = $flipped[$name];`

`null === $flipped['Lieferung Östereich']`

Correct:

`"dfaa45ef7733d41420012046e1ae6e8c" === $flipped['Lieferung Östereich']`
TagsNo tags attached.

Activities

tmloberon

2020-01-22 11:14

reporter   ~0013098

Line 521: `$name = trim(str_replace(\OxidEsales\Eshop\Core\Registry::getLang()->translateString("OEPAYPAL_PRICE"), "", $shippingOptionName));`

`$name === 'Lieferung Östereich'`

Line 527: `$deliverySetList = $this->makeUniqueNames($delSetList);`

`array_flip($deliverySetList) === ['Lieferung Östereich' => "dfaa45ef7733d41420012046e1ae6e8c"]`

Line 533: `$result = $flipped[$name];`

`null === $flipped['Lieferung Östereich']`

Correct:

`"dfaa45ef7733d41420012046e1ae6e8c" === $flipped['Lieferung Östereich']`

QA

2020-01-23 14:44

administrator   ~0013104

Last edited: 2020-01-23 14:48

the problem is to be found here: `\OxidEsales\PayPalModule\Controller\ExpressCheckoutDispatcher::extractShippingId()`

$shippingOptionName = html_entity_decode(htmlentities($shippingOptionName, ENT_QUOTES, $charset), ENT_QUOTES, $charset);

If you deactivate entity encoding in line above it wörks for umlauts in payment methods -> name but not for single and double quotation marks.

-es-