Merge pull request #1427 from woocommerce/feat/PCP-1709_soft_descriptor

Include soft descriptor for card's activity
This commit is contained in:
Emili Castells 2023-07-18 15:40:04 +02:00 committed by GitHub
commit 75f73ea090
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 5 deletions

View file

@ -971,6 +971,15 @@ return array(
return 'https://www.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=%s';
},
'wcgateway.soft-descriptor' => static function ( ContainerInterface $container ): string {
$settings = $container->get( 'wcgateway.settings' );
assert( $settings instanceof Settings );
if ( $settings->has( 'soft_descriptor' ) ) {
return $settings->get( 'soft_descriptor' );
}
return '';
},
'wcgateway.transaction-url-provider' => static function ( ContainerInterface $container ): TransactionUrlProvider {
$sandbox_url_base = $container->get( 'wcgateway.transaction-url-sandbox' );
$live_url_base = $container->get( 'wcgateway.transaction-url-live' );