# Paypal Fehler: INVALID\_CURRENCY\_AMOUNT\_FORMAT

**URL:** <https://forum.shopware.com/t/paypal-fehler-invalid-currency-amount-format/63640>\
**Category:** Plugins\
**Tags:** offizielle-shopware-\
**Created:** [19. Dezember 2019 um 15:43 UTC](https://forum.shopware.com/t/paypal-fehler-invalid-currency-amount-format/63640 "2019-12-19T15:43:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_W](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@Mike\_W](https://forum.shopware.com/u/Mike_W)\
**Post date:** [19. Dezember 2019 um 15:43 UTC](https://forum.shopware.com/t/paypal-fehler-invalid-currency-amount-format/63640/1 "2019-12-19T15:43:37Z")

</div>

Hallo Zusammen.

Hatte jemand schon einmal einen solchen Paypal Fehler?  
Erscheint nur in der Return URL -\> und der Käufer wird zurück zur Zahlartauswahl geschickt.

```
INVALID_CURRENCY_AMOUNT_FORMAT

```

Im Detail:

```
https://www.shop.de/checkout/shippingPayment/paypal_unified_error_code/2/paypal_unified_error_name/VALIDATION_ERROR/paypal_unified_error_message/

An error occurred: Invalid request - see details: Cannot construct instance of `com.paypal.platform.payments.model.rest.common.AmountDetails`, problem: INVALID_CURRENCY_AMOUNT_FORMAT line: 1, column: 396 "transactions.amount.details"

```

Klar es scheint irgendein Problem mit dem Währungscode zu geben… aber wie das Ganze zustande kommt frage ich mich.

Kann man das irgendwie vernünftig Debuggen so das ich sehen kann welchen Code er hier an Paypal weiter gibt?

Grüße  
Mike

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [19. Dezember 2019 um 16:25 UTC](https://forum.shopware.com/t/paypal-fehler-invalid-currency-amount-format/63640/2 "2019-12-19T16:25:38Z")

</div>

Hallo Mike,

mit welcher Währung wird denn versucht zu bezahlen? Es gibt z.B. ein bekanntes Problem mit der japanischen Währung Yen.

Viele Grüße aus Schöppingen

![cool](http://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/shopware.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![Mike\_W](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@Mike\_W](https://forum.shopware.com/u/Mike_W)\
**Post date:** [20. Dezember 2019 um 07:29 UTC](https://forum.shopware.com/t/paypal-fehler-invalid-currency-amount-format/63640/3 "2019-12-20T07:29:03Z")

</div>

Hallo Michael,

Der Shop ist nur auf Euro konfiguriert. Allerdings wird der Warenkorb von einem Angebots-Plugin aus dem Store generiert. Andere Zahlarten machen keine Probleme. Nur Paypal gefällt das Ganze nicht.

Viele Grüße  
Mike

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [20. Dezember 2019 um 07:38 UTC](https://forum.shopware.com/t/paypal-fehler-invalid-currency-amount-format/63640/4 "2019-12-20T07:38:52Z")

</div>

Moin Mike,

könntest du mal herausfinden, was an dieser Stelle als Currency gesetzt wird?&nbsp;[SwagPaymentPayPalUnified/PaymentBuilderService.php at master · shopwareLabs/SwagPaymentPayPalUnified · GitHub](https://github.com/shopwareLabs/SwagPaymentPayPalUnified/blob/master/Components/Services/PaymentBuilderService.php#L110)

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![Mike\_W](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@Mike\_W](https://forum.shopware.com/u/Mike_W)\
**Post date:** [20. Dezember 2019 um 12:28 UTC](https://forum.shopware.com/t/paypal-fehler-invalid-currency-amount-format/63640/5 "2019-12-20T12:28:34Z")

</div>

Hallo Michael,

also _**$this-\>basketData[‘sCurrencyName’]**_ liefert ‘EUR’ an der genannten Stelle.  
Oder meintest du was anderes?

Mike

---

<div class="post-metadata">

**Author:** ![Mike\_W](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@Mike\_W](https://forum.shopware.com/u/Mike_W)\
**Post date:** [20. Dezember 2019 um 12:34 UTC](https://forum.shopware.com/t/paypal-fehler-invalid-currency-amount-format/63640/6 "2019-12-20T12:34:51Z")

</div>

Aber der Hinweis geht auf jeden Fall in die richtige Richtung, ich habe mal das hier auch überprüft:

**_$amount-\>setDetails($this-\>getAmountDetails());_**

Und vermutlich liegt es daran das hier zu viele Nachkommastellen geliefert werden:

Mit Fehler:

```
SwagPaymentPayPalUnified\PayPalBundle\Structs\Payment\Transactions\Amount\Details Object
(
    [shipping:SwagPaymentPayPalUnified\PayPalBundle\Structs\Payment\Transactions\Amount\Details:private] => 0
    [subTotal:SwagPaymentPayPalUnified\PayPalBundle\Structs\Payment\Transactions\Amount\Details:private] => 865.55
    [tax:SwagPaymentPayPalUnified\PayPalBundle\Structs\Payment\Transactions\Amount\Details:private] => 164.45378151261
)

```

&nbsp;

Ohne Fehler:

```
SwagPaymentPayPalUnified\PayPalBundle\Structs\Payment\Transactions\Amount\Details Object
(
    [shipping:SwagPaymentPayPalUnified\PayPalBundle\Structs\Payment\Transactions\Amount\Details:private] => 0
    [subTotal:SwagPaymentPayPalUnified\PayPalBundle\Structs\Payment\Transactions\Amount\Details:private] => 7973
    [tax:SwagPaymentPayPalUnified\PayPalBundle\Structs\Payment\Transactions\Amount\Details:private] => 0.00
)

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [23. Dezember 2019 um 07:30 UTC](https://forum.shopware.com/t/paypal-fehler-invalid-currency-amount-format/63640/7 "2019-12-23T07:30:26Z")

</div>

Hallo Mike,

das könnte gut sein. Vesuche mal an dieser Stelle&nbsp;[SwagPaymentPayPalUnified/PaymentBuilderService.php at master · shopwareLabs/SwagPaymentPayPalUnified · GitHub](https://github.com/shopwareLabs/SwagPaymentPayPalUnified/blob/master/Components/Services/PaymentBuilderService.php#L293) eine Rundung auf zwei Nachkommstellen einzubauen.&nbsp;

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann
