Do not send Paypal-Request-Id

The current usage is incorrect and only causes issues without solving any problems (we don't implement any way to retry requests).
This commit is contained in:
Alex P 2022-12-15 12:37:52 +02:00
parent d23a33e4c2
commit 2f6240bfb4
No known key found for this signature in database
GPG key ID: 54487A734A204D71
9 changed files with 18 additions and 312 deletions

View file

@ -72,7 +72,6 @@ return array(
$settings = $container->get( 'wcgateway.settings' );
$intent = $settings->has( 'intent' ) && strtoupper( (string) $settings->get( 'intent' ) ) === 'AUTHORIZE' ? 'AUTHORIZE' : 'CAPTURE';
$application_context_repository = $container->get( 'api.repository.application-context' );
$pay_pal_request_id_repository = $container->get( 'api.repository.paypal-request-id' );
$subscription_helper = $container->get( 'subscription.helper' );
return new OrderEndpoint(
$container->get( 'api.host' ),
@ -82,7 +81,6 @@ return array(
$intent,
$logger,
$application_context_repository,
$pay_pal_request_id_repository,
$subscription_helper,
$bn_code
);

View file

@ -16,7 +16,6 @@ use WooCommerce\PayPalCommerce\AdminNotices\Repository\Repository;
use WooCommerce\PayPalCommerce\ApiClient\Entity\Capture;
use WooCommerce\PayPalCommerce\ApiClient\Entity\OrderStatus;
use WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies;
use WooCommerce\PayPalCommerce\ApiClient\Repository\PayPalRequestIdRepository;
use WooCommerce\PayPalCommerce\Onboarding\State;
use WooCommerce\PayPalCommerce\WcGateway\Admin\FeesRenderer;
use WooCommerce\PayPalCommerce\WcGateway\Admin\OrderTablePaymentStatusColumn;
@ -214,7 +213,6 @@ class WCGatewayModule implements ModuleInterface {
'woocommerce_paypal_commerce_gateway_deactivate',
static function () use ( $c ) {
delete_option( Settings::KEY );
delete_option( PayPalRequestIdRepository::KEY );
delete_option( 'woocommerce_' . PayPalGateway::ID . '_settings' );
delete_option( 'woocommerce_' . CreditCardGateway::ID . '_settings' );
}
@ -236,6 +234,8 @@ class WCGatewayModule implements ModuleInterface {
add_action(
'woocommerce_paypal_payments_gateway_migrate',
static function () use ( $c ) {
delete_option( 'ppcp-request-ids' );
$settings = $c->get( 'wcgateway.settings' );
assert( $settings instanceof Settings );