Commit graph

736 commits

Author SHA1 Message Date
Philipp Stracker
ca93ce4b83
♻️ Simplify API payload generation
Reason: Makes unit tests more stable, as the `for_country_currency()` helper is always called exactly once, regardless of specified arguments.
2025-05-23 18:04:33 +02:00
Emili Castells Guasch
24aa99fb80
Do not remove vaulting capabilities when subscriptions is not selecting when onboarding 2025-05-23 12:42:33 +02:00
Emili Castells
89e847bc52
Merge pull request #3163 from woocommerce/PCP-4156-implement-3ds-for-google-pay
Implement 3D secure check for Google Pay (4156)
2025-05-05 15:55:39 +02:00
Philipp Stracker
ebcf91461f
Merge branch 'trunk'
# Conflicts:
#	modules/ppcp-button/src/Helper/ThreeDSecure.php
2025-04-23 15:00:00 +02:00
Emili Castells Guasch
00bfa04289 Merge branch 'trunk' into PCP-4461-add-capture-pre-conditions-for-card-payment-source 2025-04-03 14:59:50 +02:00
Philipp Stracker
9f6b15c2dd
🔊 Add log entry when plugin caches are flushed 2025-04-02 18:25:33 +02:00
Emili Castells Guasch
e0ca70f7b6 Add liability shift check 2025-04-02 18:07:22 +02:00
Emili Castells Guasch
e4252ebbf7 Add service for checking if order is valid for capture 2025-04-02 15:51:17 +02:00
Emili Castells Guasch
e4ee46e6ee Merge trunk 2025-03-27 09:53:35 +01:00
Philipp Stracker
37532fa0dd
♻️ Refactor cache flushing to clear entire groups 2025-03-26 17:55:11 +01:00
Philipp Stracker
c89c602776
Add a new “flush” API method to the cache system 2025-03-26 17:44:31 +01:00
Philipp Stracker
bb03a41480
🎨 Apply phpcs rules to the Cache class 2025-03-26 17:43:57 +01:00
Philipp Stracker
dab2127a64
🎨 Update code style and comment 2025-03-25 14:20:26 +01:00
Philipp Stracker
383d907866
🔀 Merge branch 'trunk' 2025-03-24 17:45:03 +01:00
Daniel Dudzic
61a265a1a4
Fix another batch of typos 2025-03-24 14:27:35 +01:00
Emili Castells
3b48f8a70d
Merge pull request #3242 from woocommerce/PCP-4385-failed-to-fetch-onboarding-url-error-when-onboarding-with-no-rt-merchant-and-selecting-subscriptions-product
Do not add the capabilities if is not eligible for ACDC (4385)
2025-03-24 09:31:30 +01:00
Philipp Stracker
ba122714d8
♻️ Use the new Enum to access const values 2025-03-21 18:16:17 +01:00
Narek Zakarian
8490972513
Check if the headers exist in the request 2025-03-21 19:09:37 +04:00
Narek Zakarian
2616974c12
Restrict the BN code to return only the white listed values 2025-03-21 19:06:09 +04:00
Narek Zakarian
95af76b8fb
Remove the mapping service and path the array directly 2025-03-21 19:02:19 +04:00
Narek Zakarian
8ea71593d6
Adjust the mapping of installation paths to BN codes 2025-03-21 18:59:08 +04:00
Narek Zakarian
9d3e5c9690
the 'PayPal-Partner-Attribution-Id' is not added from here anymore 2025-03-21 18:09:50 +04:00
Narek Zakarian
fefcd25a48
Use a filter that ensures that all API requests include the appropriate BN code retrieved from the PartnerAttribution helper.
Using this approach avoids the need for extensive refactoring of existing classes that use the `RequestTrait`.
2025-03-21 18:09:49 +04:00
Narek Zakarian
00c630ea5e
Revert the changes. WIll use the filter to add it everywhere at once 2025-03-21 18:09:49 +04:00
Narek Zakarian
c781841265
BillingAgreementsEndpoint: Add the 'PayPal-Partner-Attribution-Id' header 2025-03-21 18:09:49 +04:00
Narek Zakarian
55c19d6173
🚨 Fix the test 2025-03-21 18:03:58 +04:00
Narek Zakarian
5a41260954
Fix the CS 2025-03-21 18:03:58 +04:00
Narek Zakarian
2066bb4968
🔨 🔨 Refactor: Use only the core-profiler path, otherwise use the default BN code. 2025-03-21 18:03:58 +04:00
Narek Zakarian
8e837458f7
Create a class for partner attribution.
This class handles the retrieval and persistence of the BN (Build Notation) Code,which is used to track and attribute transactions for PayPal partner integrations.

The BN Code is set once and remains persistent, even after disconnecting or uninstalling the plugin. It is determined based on the installation path and stored as a WordPress option.
2025-03-21 18:03:57 +04:00
Narek Zakarian
6da8e267cf
Add service for the BN Codes mapping. 2025-03-21 18:03:57 +04:00
carmenmaymo
784af34b1e
Merge branch 'trunk' into PCP-4156-implement-3ds-for-google-pay 2025-03-20 16:30:05 +01:00
Narek Zakarian
a40b7bc139
Do not add the capabilities if is not eligible for ACDC 2025-03-19 16:33:37 +04:00
Philipp Stracker
b8ab931a7a
🔀 Merge branch 'trunk' 2025-03-18 17:06:38 +01:00
Philipp Stracker
b9d7574418
💡 Add/update comments related to #legacy-ui todos 2025-03-14 15:30:41 +01:00
Narek Zakarian
b09fb7a64a
Always include the BILLING_AGREEMENT with subscriptions 2025-03-11 19:06:11 +04:00
Philipp Stracker
05b4baec15
🐛 Fix the partner-referral payload to pass tests 2025-03-05 17:27:39 +01:00
Philipp Stracker
57c2287739
👔 Implement the new “use-cards” onboarding flag 2025-03-05 16:52:37 +01:00
Philipp Stracker
581c28edac
👔 Implement the new subscription-flag 2025-03-05 16:39:03 +01:00
Philipp Stracker
54046cd307
♻️ Restore correct order of payload creation
The token must be added after the last filter, to maintain backwards compatibility!
2025-03-05 15:27:43 +01:00
Philipp Stracker
8cb66440d3
🎨 Reduce nesting-depth of code 2025-03-05 15:23:25 +01:00
Philipp Stracker
29ad91f515
💡 Ad deprecation comment to a property 2025-03-05 15:19:37 +01:00
Philipp Stracker
f014539a95
♻️ Remove “append-token” method
We want to build the full payload, including the token, in the `::data()` method.
2025-03-05 15:14:52 +01:00
Philipp Stracker
1c17e7199f
♻️ Replace builder pattern with function arguments
Instead of using `with_products()` to generate a new object, we now simply pass the products array to the data() function. This adds a lot more transparency to the process and makes the code easier to read and maintain.

The builder pattern is only implemented in 2 files, and both are rarely used, which makes it an overly complex solution for a simple task (in this project).
2025-03-05 14:59:55 +01:00
Philipp Stracker
112ab6485d
🎨 Fix code style 2025-03-05 14:56:31 +01:00
Philipp Stracker
c25d1768e4
️ Undo irrelevant changes in OrderEndpoint 2025-03-04 17:44:08 +01:00
Philipp Stracker
4f4905af96
Add new “OrderEndpoint::raw_order()” getter
Allows developers to decide if they want an `Order` class for internal usage, or an untyped `stdClass` for ajax responses.
2025-03-03 18:09:30 +01:00
Emili Castells
b8af9bbbfa
Merge pull request #3089 from woocommerce/PCP-4201-add-support-for-acdc-vault-and-digital-wallets-to-hong-kong-and-singapore
Add support for ACDC, Vault, and Digital Wallets to Hong Kong and Singapore (4201)
2025-02-24 09:48:20 +01:00
Emili Castells Guasch
fe4ae4211e Add type to property definition 2025-02-20 15:03:15 +01:00
Emili Castells Guasch
489942d6b1 Merge branch 'trunk' into PCP-4155-store-and-use-the-merchant-country 2025-02-19 14:35:22 +01:00
Emili Castells Guasch
c7b3cda2c4 Fix phpcs 2025-02-18 12:44:31 +01:00