View Issue Details

IDProjectCategoryView StatusLast Update
0007788module PayPal Checkoutmodule PayPal checkout - subpublic2025-05-14 09:37
Reporterfcos Assigned To 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status closedResolutionunable to reproduce 
Product Version2.5.2 / 3.4.0 
Summary0007788: Payment breakdown create wrong price format in 2.5.3
DescriptionHello,

the paypal payment breakdown in
/vendor/oxid-solution-catalysts/paypal-module/src/Core/PayPalRequestAmountFactory.php:: createAmountWithBreakdown()

casts $amount->value to float wich creates an PayPal DECIMAL_PRECISION error, it probably should only be cast when passing it to the calculateBreakdown() method.

The weird thing is i could only reproduce it with multiple items in basket, with a single item it worked.

Because of the error it also creates an error 500 in
/vendor/oxid-solution-catalysts/paypal-module/src/Controller/ProxyController.php::createGooglePayOrder()
the "if (!$response)" check dosnt have an outputJson so it tries to render an non existing template.
OXID Logger.ERROR: OxidEsales\EshopCommunity\Internal\Framework\Templating\Resolver\LegacyTemplateNameResolver::resolve(): Argument #1 ($name) must be of type string, null given

It only happend after updating to 2.5.3 because of the multiple changes in the payment breakdown handling.

Steps To Reproduce- put multiple items in basket
- order with google pay
- in the browser console you should see the url failing and an error in oxideshop.log
Additional InformationPayPal Respone:
Date and time
24/04/25, 12:49
Request path /v2/checkout/orders
Status
422
Issue DECIMAL_PRECISION
Description The requested action could not be performed, semantically incorrect, or failed business validation.

Example PayPal Request Body that failed:

{
  "additional_properties": {},
  "body": {
    "intent": "CAPTURE",
    "processing_instruction": "NO_INSTRUCTION",
    "payer": {
      "email_address": "*****",
      "name": {
        "given_name": "*****",
        "surname": "*****"
      },
      "birth_date": "*****",
      "address": {
        ...
      }
    },
    "purchase_units": [
      {
        "reference_id": "OXID_REFERENCE",
        "amount": {
          "currency_code": "EUR",
          "value": 25.97,
          "breakdown": {
            "item_total": {
              "currency_code": "EUR",
              "value": "19.98"
            },
            "shipping": {
              "currency_code": "EUR",
              "value": "5.99"
            },
            "tax_total": {
              "currency_code": "EUR",
              "value": "0.00"
            }
          }
        },
        "description": "Zahlung bei ...",
        "items": [
          {
            "name": "Produkt 1",
            "unit_amount": {
              "currency_code": "EUR",
              "value": "13.99"
            },
            "tax": {
              "currency_code": "EUR",
              "value": "0.00"
            },
            "quantity": "1",
            "tax_rate": "0",
            "category": "PHYSICAL_GOODS"
          },
          {
            "name": "Produkt 2",
            "unit_amount": {
              "currency_code": "EUR",
              "value": "5.99"
            },
            "tax": {
              "currency_code": "EUR",
              "value": "0.00"
            },
            "quantity": "1",
            "tax_rate": "0",
            "category": "PHYSICAL_GOODS"
          }
        ],
        "shipping": {
          "name": {
            "full_name": "*****"
          },
          "address": {
            ....
          }
        }
      }
    ],
    "payment_source": {
      "google_pay": {
        "attributes": {
          "verification": {
            "method": "xxxxxx"
          }
        }
      }
    },
    "application_context": {
      ....
    }
  },
  "header": {
    ...
  },
  "method": "POST"
}
TagsNo tags attached.

Activities

There are no notes attached to this issue.