mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-12 01:18:39 +08:00
Move fraudnet session id logic into entity getter method
This commit is contained in:
parent
e7e8140739
commit
23962841e7
3 changed files with 23 additions and 65 deletions
|
@ -1285,17 +1285,12 @@ return array(
|
|||
$container->get( 'wcgateway.processor.refunds' )
|
||||
);
|
||||
},
|
||||
'wcgateway.fraudnet-session-id' => static function ( ContainerInterface $container ): FraudNetSessionId {
|
||||
return new FraudNetSessionId();
|
||||
},
|
||||
'wcgateway.fraudnet-source-website-id' => static function ( ContainerInterface $container ): FraudNetSourceWebsiteId {
|
||||
return new FraudNetSourceWebsiteId( $container->get( 'api.merchant_id' ) );
|
||||
},
|
||||
'wcgateway.fraudnet' => static function ( ContainerInterface $container ): FraudNet {
|
||||
$session_id = $container->get( 'wcgateway.fraudnet-session-id' );
|
||||
$source_website_id = $container->get( 'wcgateway.fraudnet-source-website-id' );
|
||||
return new FraudNet(
|
||||
(string) $session_id(),
|
||||
(string) $source_website_id()
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue