View Issue Details

IDProjectCategoryView StatusLast Update
0007865module PayPal Checkoutmodule PayPal checkout - subpublic2025-12-05 14:47
Reportermetropolis Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.6.3 / 3.5.1 
Target Version2.6.4 / 3.5.2Fixed in Version2.6.4 / 3.5.2 
Summary0007865: Paypal checkout is not able to handle amounts with decimal numbers
DescriptionIf you order uneven amounts of an item, checkout via PayPal is not possible. The checkout opens the login window from Paypal and then it closes and the checkout throws you back on the order summary page.

We are offering fabrics in our shop, and the shop settings are set to "Allow non-integer entries for item quantities (e.g., 1.5)", so our customers can order for e.g. 0.4m of a fabric.
Shop version is 7.2.

In earlier versions of Paypal Checkout non integer values were no problem, we had many orders with no problems.
Our old Oxid shop was version 6.4.3 with Checkout version 2.3.4 and non integer orders were no problem.
Steps To ReproduceSet the shop to "Allow non-integer entries for item quantities (e.g., 1.5)"
Set the Debug Level of the Paypal module to "Debug"
Place an item in the cart and use a non integer amount value.

Proceed with checkout and try to use Paypal (no matter if live or sandbox mode)

Click on "Pay with PayPal"

The Paypal login windows should open and closes after a short time, throwing you back on the order summary page of the shop.
No visible error on frontend, but there should be an entry in the PayPal checkout log.
Additional InformationError in the log is:

Error Details:
[{"field":"\/purchase_units\/@reference_id=='OXID_REFERENCE'\/items\/0\/quantity","value":"0.4","location":"body","issue":"INVALID_PARAMETER_SYNTAX","description":"The value of a field does not conform to the expected format."}]
TagsNo tags attached.

Activities

QA

2025-12-03 12:34

administrator   ~0018278

- es -

Steps to reproduce:
1. Shop Admin -> Master Settings -> Core settings -> Settings -> Order -> Allow fraction Quantities (e.g. 1.5)
2. Shop Admin -> Administer products -> Extended -> Set Quantity and Unit
3. On Detail Page select PayPal Express

-> PayPal Overlay Opens and Close

mario_lorenz

2025-12-04 11:00

developer   ~0018283

Hm, the Paypal-documentation said:

https://developer.paypal.com/docs/api/orders/v2/#orders_create!ct=application/json&path=purchase_units/items&t=request

quantity = required / string <= 10 characters / The item quantity. Must be a whole number.

And it is strange, but correct, the field-type is a string, but it must be a whole number.

The only solution could be, to do not provide items, if there are quantities with decimal-points inside.

metropolis

2025-12-04 12:41

reporter   ~0018284

@Mario_lorenz:

Quote: "The only solution could be, to do not provide items, if there are quantities with decimal-points inside. "

No, i can´t accept this solution. We had no problems at all since we are using Oxid Shop with a PayPal / PayPal Checkout module and fraction quantities for our fabrics.
It workes flawlessly.

Also with the Paypal Checkout in our old Shop 6.4.3 with the Paypal Checkout 2.3.4 it was possible to pay with Paypal and fraction quantities in the cart.

So it must be possible to fix this.

I don´t know what was changed, but the problem first occurs after updating the shop to 7.2 and using the 3.x.x branch for the Paypal Checkout.
Before the update everything was ok.

metropolis

2025-12-04 15:11

reporter   ~0018286

Additional Note:

I have checked the checkout module on different shops / module versions.

Shop 6.4.3:
Paypal Checkout 2.5.0 -> ordering of uneven amounts is possible, no error, Paypal login page is opening and order can be completed successful
Paypal Checkout 2.5.1 -> ordering of uneven amounts ist not possible, Paypal login does not open and shop frontend throws an error "Autorisierung der Zahlung fehlgeschlagen. Bitte prüfen Sie Ihre Eingabe!"

Shop 7.2:
Paypal Checkout 3.4.0 -> ordering of uneven amounts is possible, no error, Paypal login page is opening and order can be completed successful
Paypal Checkout 3.4.1 -> ordering of uneven amounts ist not possible, Paypal login does not open and shop frontend throws an error "Autorisierung der Zahlung fehlgeschlagen. Bitte prüfen Sie Ihre Eingabe!"

After downgrading the PayPal checkout to a working version, ordering uneven amounts is possible again.
So the PayPal API in general can handle uneven amounts.
There must be a change from version 2.5.0 to 2-5-1 / 3.4.0 to 3.4.1 which is blocking the order of uneven amounts.

mario_lorenz

2025-12-05 14:47

developer   ~0018287

@metropolis: The solution is as follows: We check if the shopping cart contains items with a quantity that includes decimal points. If so, we don't transfer any of the items during the transaction. The order and payment still go through. Only the PayPal backend shows no items in the order. We have addressed this issue with PayPal. Currently, there is no other solution. PayPal's API only allows whole numbers in this case.