mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
PCP-39 add capture downloads only immediatly option
This commit is contained in:
parent
abd4c171dc
commit
607a247133
4 changed files with 74 additions and 3 deletions
|
@ -104,13 +104,17 @@ return [
|
|||
$paymentsEndpoint = $container->get('api.endpoint.payments');
|
||||
$orderFactory = $container->get('api.factory.order');
|
||||
$threeDsecure = $container->get('button.helper.three-d-secure');
|
||||
$authorizedPaymentsProcessor = $container->get('wcgateway.processor.authorized-payments');
|
||||
$settings = $container->get('wcgateway.settings');
|
||||
return new OrderProcessor(
|
||||
$sessionHandler,
|
||||
$cartRepository,
|
||||
$orderEndpoint,
|
||||
$paymentsEndpoint,
|
||||
$orderFactory,
|
||||
$threeDsecure
|
||||
$threeDsecure,
|
||||
$authorizedPaymentsProcessor,
|
||||
$settings
|
||||
);
|
||||
},
|
||||
'wcgateway.processor.authorized-payments' => static function (ContainerInterface $container): AuthorizedPaymentsProcessor {
|
||||
|
@ -340,6 +344,23 @@ return [
|
|||
'requirements' => [],
|
||||
'gateway' => 'all',
|
||||
],
|
||||
'capture_for_virtual_only' => [
|
||||
'title' => __('Capture Virtual-Only Orders ', 'woocommerce-paypal-commerce-gateway'),
|
||||
'type' => 'checkbox',
|
||||
'default' => false,
|
||||
'desc_tip' => true,
|
||||
'description' => __(
|
||||
'If the order contains exclusively virtual items, enable this to immediately capture, rather than authorize, the transaction.',
|
||||
'woocommerce-paypal-commerce-gateway'
|
||||
),
|
||||
'label' => __('Capture Virtual-Only Orders', 'woocommerce-paypal-commerce-gateway'),
|
||||
'screens' => [
|
||||
State::STATE_PROGRESSIVE,
|
||||
State::STATE_ONBOARDED,
|
||||
],
|
||||
'requirements' => [],
|
||||
'gateway' => 'all',
|
||||
],
|
||||
'payee_preferred' => [
|
||||
'title' => __('Instant Payments ', 'woocommerce-paypal-commerce-gateway'),
|
||||
'type' => 'checkbox',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue