mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
Merge branch 'master' into feature/create-order-intent-authorize
This commit is contained in:
commit
5042ab9e45
2 changed files with 4 additions and 2 deletions
|
@ -5,8 +5,8 @@ namespace Inpsyde\PayPalCommerce\ApiClient;
|
||||||
|
|
||||||
use Dhii\Data\Container\ContainerInterface;
|
use Dhii\Data\Container\ContainerInterface;
|
||||||
use Inpsyde\CacheModule\Provider\CacheProviderInterface;
|
use Inpsyde\CacheModule\Provider\CacheProviderInterface;
|
||||||
use Inpsyde\PayPalCommerce\ApiClient\Config\Config;
|
|
||||||
use Inpsyde\PayPalCommerce\ApiClient\Authentication\Bearer;
|
use Inpsyde\PayPalCommerce\ApiClient\Authentication\Bearer;
|
||||||
|
use Inpsyde\PayPalCommerce\ApiClient\Config\Config;
|
||||||
use Inpsyde\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint;
|
use Inpsyde\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint;
|
||||||
use Inpsyde\PayPalCommerce\ApiClient\Factory\AddressFactory;
|
use Inpsyde\PayPalCommerce\ApiClient\Factory\AddressFactory;
|
||||||
use Inpsyde\PayPalCommerce\ApiClient\Factory\AmountFactory;
|
use Inpsyde\PayPalCommerce\ApiClient\Factory\AmountFactory;
|
||||||
|
@ -120,7 +120,8 @@ return [
|
||||||
return new ShippingFactory($addressFactory);
|
return new ShippingFactory($addressFactory);
|
||||||
},
|
},
|
||||||
'api.factory.amount' => function (ContainerInterface $container) : AmountFactory {
|
'api.factory.amount' => function (ContainerInterface $container) : AmountFactory {
|
||||||
return new AmountFactory();
|
$itemFactory = $container->get('api.factory.item');
|
||||||
|
return new AmountFactory($itemFactory);
|
||||||
},
|
},
|
||||||
'api.factory.payer' => function (ContainerInterface $container) : PayerFactory {
|
'api.factory.payer' => function (ContainerInterface $container) : PayerFactory {
|
||||||
$addressFactory = $container->get('api.factory.address');
|
$addressFactory = $container->get('api.factory.address');
|
||||||
|
|
|
@ -104,6 +104,7 @@ class AmountFactory
|
||||||
$total,
|
$total,
|
||||||
$breakdown
|
$breakdown
|
||||||
);
|
);
|
||||||
|
return $amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fromPayPalResponse(\stdClass $data) : Amount
|
public function fromPayPalResponse(\stdClass $data) : Amount
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue