mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Merge branch 'trunk' into PCP-591-save-and-display-vaulted-payment-methods-in-woo-commerce-native-endpoint
This commit is contained in:
commit
d558f0db5c
6 changed files with 24 additions and 0 deletions
|
@ -9,6 +9,8 @@
|
|||
* Enhancement - Add FraudNet to all payments #1040
|
||||
* Enhancement - Update "Standard Payments" tab settings #1065
|
||||
* Enhancement - Update PHP 7.2 requirement in all relevant files #1084
|
||||
* Enhancement - When PUI is enabled FraudNet should be also enabled #1129
|
||||
* Enhancement - Add PayPal-Request-Id if payment source exist #1132
|
||||
|
||||
= 2.0.1 - 2022-12-13 =
|
||||
* Fix - Error while syncing tracking data to PayPal -> Sync GZD Tracking #1020
|
||||
|
|
|
@ -236,6 +236,10 @@ class OrderEndpoint {
|
|||
$args['headers']['PayPal-Client-Metadata-Id'] = $this->fraudnet->session_id();
|
||||
}
|
||||
|
||||
if ( isset( $data['payment_source'] ) ) {
|
||||
$args['headers']['PayPal-Request-Id'] = uniqid( 'ppcp-', true );
|
||||
}
|
||||
|
||||
$response = $this->request( $url, $args );
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error = new RuntimeException(
|
||||
|
|
|
@ -1147,6 +1147,16 @@ return array(
|
|||
|
||||
return false;
|
||||
},
|
||||
'wcgateway.settings.should-disable-fraudnet-checkbox' => static function( ContainerInterface $container ): bool {
|
||||
$pui_helper = $container->get( 'wcgateway.pay-upon-invoice-helper' );
|
||||
assert( $pui_helper instanceof PayUponInvoiceHelper );
|
||||
|
||||
if ( $pui_helper->is_pui_gateway_enabled() ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
'wcgateway.settings.tracking-label' => static function ( ContainerInterface $container ): string {
|
||||
$tracking_label = sprintf(
|
||||
// translators: %1$s and %2$s are the opening and closing of HTML <a> tag.
|
||||
|
|
|
@ -139,6 +139,11 @@ class PayUponInvoice {
|
|||
* @throws NotFoundException When setting is not found.
|
||||
*/
|
||||
public function init(): void {
|
||||
if ( $this->pui_helper->is_pui_gateway_enabled() ) {
|
||||
$this->settings->set( 'fraudnet_enabled', true );
|
||||
$this->settings->persist();
|
||||
}
|
||||
|
||||
add_filter(
|
||||
'ppcp_partner_referrals_data',
|
||||
function ( array $data ): array {
|
||||
|
|
|
@ -411,6 +411,7 @@ return function ( ContainerInterface $container, array $fields ): array {
|
|||
),
|
||||
'requirements' => array(),
|
||||
'gateway' => Settings::CONNECTION_TAB_ID,
|
||||
'input_class' => $container->get( 'wcgateway.settings.should-disable-fraudnet-checkbox' ) ? array( 'ppcp-disabled-checkbox' ) : array(),
|
||||
),
|
||||
|
||||
'credentials_integration_configuration_heading' => array(
|
||||
|
|
|
@ -90,6 +90,8 @@ Follow the steps below to connect the plugin to your PayPal account:
|
|||
* Enhancement - Add FraudNet to all payments #1040
|
||||
* Enhancement - Update "Standard Payments" tab settings #1065
|
||||
* Enhancement - Update PHP 7.2 requirement in all relevant files #1084
|
||||
* Enhancement - When PUI is enabled FraudNet should be also enabled #1129
|
||||
* Enhancement - Add PayPal-Request-Id if payment source exist #1132
|
||||
|
||||
= 2.0.1 =
|
||||
* Fix - Error while syncing tracking data to PayPal -> Sync GZD Tracking #1020
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue