View Issue Details

IDProjectCategoryView StatusLast Update
0007963module PayPal Checkoutmodule PayPal checkout - subpublic2026-07-31 12:17
Reportermario_lorenz Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionopen 
Product Version2.6.1 / 3.5.0 
Target Version2.9.2 / 3.8.2Fixed in Version2.9.2 / 3.8.2 
Summary0007963: PayPal smart button: terms-and-conditions check runs inside createOrder instead of onClick
DescriptionOn the order step ("Jetzt kaufen" / step 4), clicking the PayPal button without confirming the terms-and-conditions checkbox makes the PayPal popup open briefly and close again.
The browser console shows:
Uncaught Error: Expected an order id to be passed (thrown by PayPal JS SDK v5.0.556, paypal.com/smart/buttons).

Root cause
The standard PayPal button (<div id="oscpaypal"> from checkout_order_btn_submit_bottom.tpl) is rendered by standard-payment-controller.js. The terms check (checkTermsAndConditions()) exists, but it runs inside createOrder and, on failure, does a bare return; — i.e. createOrder resolves to undefined. Since the PayPal SDK opens the popup synchronously on click and only then calls createOrder, an undefined return triggers the SDK's strict order-id check, which surfaces as the visible error and a popup that closes immediately. getPayButtonSettings() defines no onClick handler, so there is no pre-flight rejection.

Correct behaviour (existing reference)
Apple Pay (applepay.tpl) and Google Pay (googlepay-payment-controller.js) already perform the check before the payment flow starts — in the click handler / onClick, returning early / actions.reject() so the popup never opens.

Affected
  - standard-payment-controller.js — check in createOrder instead of onClick (primary, matches the report).
  - acdc-payment-controller.js — same pattern (check inside order creation rather than onClick).
  - paymentbuttons.tpl (Express / SEPA / CC funding buttons) — no terms check at all; separate but same failure class.

Fix direction
Add an onClick(data, actions) pre-check to the PayPal/ACDC button settings that calls checkTermsAndConditions(), shows READ_AND_CONFIRM_TERMS and rejects (actions.reject()) before the popup opens; keep createOrder as a safety net. Mirror the same pre-check into the funding buttons in paymentbuttons.tpl. To be fixed in the OXID 6 and OXID 7 module lines.
Additional InformationQA - ES -
TagsNo tags attached.

Activities

There are no notes attached to this issue.