mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
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:
parent
d23a33e4c2
commit
2f6240bfb4
9 changed files with 18 additions and 312 deletions
|
@ -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
|
||||
);
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue