View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0007963 | module PayPal Checkout | module PayPal checkout - sub | public | 2026-06-12 15:55 | 2026-07-31 12:17 |
| Reporter | mario_lorenz | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | open | ||
| Product Version | 2.6.1 / 3.5.0 | ||||
| Target Version | 2.9.2 / 3.8.2 | Fixed in Version | 2.9.2 / 3.8.2 | ||
| Summary | 0007963: PayPal smart button: terms-and-conditions check runs inside createOrder instead of onClick | ||||
| Description | On 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 Information | QA - ES - | ||||
| Tags | No tags attached. | ||||