mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
process orders when credit card is approved
This commit is contained in:
parent
f9dac40c47
commit
241a5e170d
5 changed files with 36 additions and 10 deletions
|
@ -10,6 +10,7 @@ use Inpsyde\PayPalCommerce\ApiClient\Entity\Order;
|
|||
use Inpsyde\PayPalCommerce\ApiClient\Entity\OrderStatus;
|
||||
use Inpsyde\PayPalCommerce\ApiClient\Factory\OrderFactory;
|
||||
use Inpsyde\PayPalCommerce\ApiClient\Repository\CartRepository;
|
||||
use Inpsyde\PayPalCommerce\Button\Helper\ThreeDSecure;
|
||||
use Inpsyde\PayPalCommerce\Session\SessionHandler;
|
||||
use Inpsyde\PayPalCommerce\TestCase;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Gateway\WcGateway;
|
||||
|
@ -64,13 +65,15 @@ class OrderProcessorTest extends TestCase
|
|||
->expects('fromWcOrder')
|
||||
->with($wcOrder, $currentOrder)
|
||||
->andReturn($currentOrder);
|
||||
$threeDSecure = Mockery::mock(ThreeDSecure::class);
|
||||
|
||||
$testee = new OrderProcessor(
|
||||
$sessionHandler,
|
||||
$cartRepository,
|
||||
$orderEndpoint,
|
||||
$paymentsEndpoint,
|
||||
$orderFactory
|
||||
$orderFactory,
|
||||
$threeDSecure
|
||||
);
|
||||
|
||||
$cart = Mockery::mock(\WC_Cart::class);
|
||||
|
@ -148,13 +151,15 @@ class OrderProcessorTest extends TestCase
|
|||
->expects('fromWcOrder')
|
||||
->with($wcOrder, $currentOrder)
|
||||
->andReturn($currentOrder);
|
||||
$threeDSecure = Mockery::mock(ThreeDSecure::class);
|
||||
|
||||
$testee = new OrderProcessor(
|
||||
$sessionHandler,
|
||||
$cartRepository,
|
||||
$orderEndpoint,
|
||||
$paymentsEndpoint,
|
||||
$orderFactory
|
||||
$orderFactory,
|
||||
$threeDSecure
|
||||
);
|
||||
|
||||
$cart = Mockery::mock(\WC_Cart::class);
|
||||
|
@ -211,13 +216,16 @@ class OrderProcessorTest extends TestCase
|
|||
$orderEndpoint = Mockery::mock(OrderEndpoint::class);
|
||||
$paymentsEndpoint = Mockery::mock(PaymentsEndpoint::class);
|
||||
$orderFactory = Mockery::mock(OrderFactory::class);
|
||||
$threeDSecure = Mockery::mock(ThreeDSecure::class);
|
||||
$threeDSecure->expects('proceedWithOrder')->andReturn(ThreeDSecure::NO_DECISION);
|
||||
|
||||
$testee = new OrderProcessor(
|
||||
$sessionHandler,
|
||||
$cartRepository,
|
||||
$orderEndpoint,
|
||||
$paymentsEndpoint,
|
||||
$orderFactory
|
||||
$orderFactory,
|
||||
$threeDSecure
|
||||
);
|
||||
|
||||
$cart = Mockery::mock(\WC_Cart::class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue