Commit graph

6154 commits

Author SHA1 Message Date
Philipp Stracker
c382b5cee1
🐛 Fix incorrect event listeners 2024-08-08 20:36:16 +02:00
Philipp Stracker
dada95520e
🐛 Fix incorrect preview update on settings page 2024-08-08 18:52:53 +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
3538a69402
️ Only recreate payment button when needed
Check if the button is still in DOM before recreating it
2024-08-08 14:42:01 +02:00
Philipp Stracker
934441fdeb
🐛 Fix initial visibility of payment button 2024-08-08 14:41:09 +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
844cafd9cb
💡 Use ConsoleLogger for PreviewButtonManager
Also add some comments and additional log output
2024-08-08 14:08:20 +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
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
Emili Castells
3d5c15b343
Merge pull request #2492 from woocommerce/PCP-3517-apple-pay-shipping-callback-is-not-working
Apple Pay: Fix the shipping callback (3517)
2024-08-07 13:56:32 +02:00
Emili Castells
ff4cd0c9a4
Merge pull request #2491 from woocommerce/use-client-credentials-for-user-tokens
Use client credentials for user tokens (3518)
2024-08-07 13:55:32 +02:00
Emili Castells Guasch
939991c42f Revert #2283 2024-08-07 12:47:11 +02:00
Emili Castells Guasch
7778cfafed Revert #2283 2024-08-07 12:45:44 +02:00
Emili Castells Guasch
4f47b382c5 Add token expiration 2024-08-07 10:36:05 +02:00
Emili Castells Guasch
8411ef2106 Fix not returning the cached token 2024-08-07 09:51: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
b85a16abda
♻️ Move button event dispatcher to helper file 2024-08-06 17:13:51 +02:00
Emili Castells Guasch
b42e9436ae Add id token cache key for each user 2024-08-06 15:30:50 +02:00
Emili Castells Guasch
a1413782e9 Invalidate cache when switching user 2024-08-06 12:32:40 +02:00
Emili Castells Guasch
22c2b5afd4 Delete transients stored while user is logged in 2024-08-06 12:04:58 +02:00
Emili Castells Guasch
c68db5c1a1 Fix phpcs 2024-08-06 11:35:28 +02:00
Emili Castells Guasch
86860d4fd6 Fix phpunit 2024-08-06 11:23:50 +02:00
Emili Castells Guasch
9c380917c5 Fix phpunit 2024-08-06 11:14:46 +02:00
Daniel Dudzic
bc58fce8a0
Apple Pay: Fix the shipping callback 2024-08-06 10:56:37 +02:00
Emili Castells Guasch
54657ed649 Add tokens cache 2024-08-06 10:44:54 +02:00
Emili Castells Guasch
bea17db588 Use client credentials 2024-08-06 09:25:28 +02:00
Philipp Stracker
3c200e408a
🚚 Move ConsoleLogger to wc-gateway module 2024-08-05 12:54:24 +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
Emili Castells
a152027772
Merge pull request #2471 from woocommerce/PCP-3494-tax-rate-id-and-tax-amount-visible-on-order-received-page-when-shipping-callback-is-enabled-and-payment-is-done-from-product-page-mini-cart-or-classic-cart-page
Do not add tax info into order meta during order creation
2024-07-30 17:07:21 +02: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
Emili Castells
4ac1f4e40c
Merge pull request #2468 from woocommerce/PCP-3488-add-apple-pay-google-pay-support-for-china
Add Apple Pay and Google Pay support for China, simplify country-currency matrix (3488)
2024-07-30 17:06:08 +02:00
Emili Castells
f3125156a9
Merge pull request #2469 from woocommerce/PCP-3453-add-amex-support-for-advanced-card-processing-in-china
Add AMEX support for Advanced Card Processing in China (3453)
2024-07-30 17:05:33 +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