Commit graph

366 commits

Author SHA1 Message Date
George Burduli
42c2e4c927
Remove redundant PNGs 2024-08-13 11:47:22 +04:00
George Burduli
9fbc28506f
Update Google Pay icon with SVG 2024-08-13 11:41:32 +04:00
Philipp Stracker
b37d8cf838
💡 Improve some code comments 2024-08-12 18:52:02 +02:00
Philipp Stracker
966b76102c
🐛 Fix init errors “No API configuration...”
Caused by calling `reinit()` before the invoking `init()` first. New condition in `reinit()` ensures that the button configuration is present.
2024-08-12 18:50:17 +02:00
Philipp Stracker
843403cbdc
🔊 Console error when button init fails 2024-08-12 17:38:43 +02:00
Philipp Stracker
e80b81da72
🐛 Fix missing button outline in front end 2024-08-11 14:02:17 +02:00
Philipp Stracker
6aad61f610
🐛 Fetch transaction details on button click
Fixes an issue with multiple payment buttons on one page, like Mini-Cart and Single Product
2024-08-09 16:23:44 +02:00
Philipp Stracker
7106413f87
🐛 Refresh total price when checkout form changes
Applies the selected shipping costs to the Google Payment button
2024-08-08 21:01:22 +02:00
Philipp Stracker
4311e94297
🚧 Allow updating transaction details 2024-08-08 17:55:49 +02:00
Philipp Stracker
722289a545
Provide means to update styling of a button
Before this, we needed to create a new button instance to display changes in button style. This allows updating an existing button instance
2024-08-08 17:53:59 +02:00
Philipp Stracker
4ca309768e
♻️ Extract the GooglePayPreviewButton to own file
Also note the change in line 43 (new file) where we use `new GooglepayButton` instead of `GooglepayButton.createButton`
2024-08-08 14:09:43 +02:00
Philipp Stracker
7729007774
♻️ Unify constructor arguments of PaymentButton
Factory method and constuctor have same arguments in the same order
2024-08-08 14:05:57 +02:00
Philipp Stracker
9ac4300995
🐛 Address some errors in preview (Settings page) 2024-08-08 13:10:26 +02:00
Philipp Stracker
7f3636348b
🐛 Fix button insertion logic in block checkout
The Google Pay button was inserted into the wrong DOM wrapper
2024-08-07 23:07:04 +02:00
Philipp Stracker
e9c557a361
🐛 Fix issue with duplicate button instances
On Block Checkout pages, there were multiple PaymentButton instances for the same context.
2024-08-07 22:36:35 +02:00
Philipp Stracker
95c7d4f7bc
♻️ Simplify PaymentButton creation code 2024-08-07 18:26:02 +02:00
Philipp Stracker
8c811d9f8e
🥅 Improve code stability and documentation 2024-08-07 15:45:28 +02:00
Philipp Stracker
7c8c9429e0
🐛 Fix Google Pay button on non-checkout pages
Reflect changes of PR #2495
2024-08-07 15:19:34 +02:00
Philipp Stracker
e41470b159
🐛 Fix Google Pay button on non-checkout pages 2024-08-07 15:01:27 +02:00
Philipp Stracker
429568fbd9
🔥 Minor cleanup 2024-08-07 14:48:36 +02:00
Philipp Stracker
4b30449ddb
🩹 ConsoleLogger will always output error messages 2024-08-07 14:36:51 +02:00
Philipp Stracker
31867b17d6
🔀 Merge branch 'trunk'
# Conflicts:
#	modules/ppcp-googlepay/resources/js/GooglepayButton.js
2024-08-07 14:30:12 +02:00
Philipp Stracker
fc805a4369
♻️ Move most of the display logic to base class
The PaymentButton base class now handles display logic that is shared between different APMs
2024-08-06 17:45:53 +02:00
Philipp Stracker
f69209b91c
New PaymentButton base class for APM buttons
This class is used to render buttons in the front end, and encapsulates logic that is shared between ApplePay and GooglePay buttons
2024-08-02 17:12:07 +02:00
Philipp Stracker
f1f243505c
Introduce a new ConsoleLogger JS class
Extract debug logic to separate component
2024-08-02 16:32:27 +02:00
Philipp Stracker
9da37a2cc6
Introduce new “isVisible” flag 2024-08-02 15:57:57 +02:00
George Burduli
000cc8ed9e
Change Apple Pay and Google Pay default button labels to plain 2024-07-31 11:53:13 +04:00
Emili Castells
9fbeaf56be
Merge pull request #2474 from woocommerce/PCP-3493-validation-on-classic-checkout-page-automatically-triggered-when-google-pay-is-enabled
Google Pay: Prevent field validation from being triggered on checkout page load (3493)
2024-07-30 17:06:44 +02:00
Philipp Stracker
0888c696ff
Sync gateway visibility via custom event 2024-07-30 14:48:47 +02:00
Philipp Stracker
490cd1958b
♻️ Move config object to appropriate file 2024-07-30 13:51:16 +02:00
Philipp Stracker
ef6632c85f
Add new isEligible flag
The flag is set once Google’s PaymentClient responds to the isReadyToPay() request and controls the rendering of the button
2024-07-30 12:50:41 +02:00
Daniel Dudzic
a301d901dd
Google Pay: Update the formValidator name 2024-07-30 10:31:44 +02:00
Daniel Dudzic
5ad73cf5f0
Google Pay: Prevent field validation from being triggered on checkout page load 2024-07-30 10:24:26 +02:00
Philipp Stracker
8286085f59
♻️ Apply latest JS structure from ApplePay Gateway
- Partially addresses the known display bug
- Simplifies maintainance between both gateways
- Reduces component-internal redundancies
2024-07-29 21:16:53 +02:00
Philipp Stracker
8814b1f636
💡 Improve/adjust debug logging 2024-07-29 18:30:03 +02:00
Philipp Stracker
1e5b6d5a21
Improve debug-logging for GooglePayButton events
Implement same logic as we use for the ApplePayButton
2024-07-29 18:08:59 +02:00
Philipp Stracker
8afa7e34dc
🐛 Prevent duplicate payment button instances 2024-07-29 16:20:47 +02:00
George Burduli
5252888721
phpcs fix 2024-07-29 13:29:48 +04:00
George Burduli
a06c01ad1f
phpcs fix 2024-07-29 13:13:56 +04:00
George Burduli
548c0082eb
Add China to GPay support, simplify country-currency matrix 2024-07-29 13:11:54 +04:00
Daniel Dudzic
f25140b51d
Merge branch 'trunk' of github.com:woocommerce/woocommerce-paypal-payments into PCP-3374-google-pay-button-not-displayed-in-the-word-press-editor 2024-07-26 13:24:21 +02:00
Daniel Dudzic
09ff65aba4
Refactor script loading to allow for adding custom namespaces 2024-07-26 12:39:38 +02:00
Emili Castells
2e44e11dbe
Merge pull request #2414 from woocommerce/PCP-2645-when-selecting-google-pay-as-a-payment-option-in-safari-a-developer-error-is-displayed
Google Pay: Fix the incorrect popup triggering (2645)
2024-07-23 12:57:00 +02:00
Emili Castells Guasch
93506fe5b7 Revert webhook handling for now so psalm does not complain 2024-07-22 14:42:03 +02:00
Emili Castells Guasch
86e0007ae6 Add gateway icon, title and description 2024-07-22 12:53:41 +02:00
Emili Castells Guasch
e547d7e097 Show button in PayPal gateway if Google Pay gateway is disabled 2024-07-17 16:39:53 +02:00
Emili Castells Guasch
39ffbaa6e7 Add googlepay and apm css classes to button wrapper 2024-07-17 15:23:10 +02:00
Emili Castells Guasch
40805c1a13 Add googlepay button to pay for order page 2024-07-17 15:16:58 +02:00
Daniel Dudzic
f66e6aff99
Google Pay: Fix the context being stuck on mini-cart 2024-07-17 12:36:44 +02:00
Emili Castells Guasch
db4787a360 Remove temp leftovers 2024-07-16 17:57:33 +02:00