mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Merge pull request #1427 from woocommerce/feat/PCP-1709_soft_descriptor
Include soft descriptor for card's activity
This commit is contained in:
commit
75f73ea090
4 changed files with 40 additions and 5 deletions
|
@ -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' );
|
||||
|
|
|
@ -423,6 +423,20 @@ return function ( ContainerInterface $container, array $fields ): array {
|
|||
'</a>'
|
||||
),
|
||||
),
|
||||
'soft_descriptor' => array(
|
||||
'title' => __( 'Soft Descriptor', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'text',
|
||||
'desc_tip' => true,
|
||||
'description' => __( 'The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer\'s card statement. Text field, max value of 22 characters.', 'woocommerce-paypal-payments' ),
|
||||
'maxlength' => 22,
|
||||
'default' => '',
|
||||
'screens' => array(
|
||||
State::STATE_START,
|
||||
State::STATE_ONBOARDED,
|
||||
),
|
||||
'requirements' => array(),
|
||||
'gateway' => Settings::CONNECTION_TAB_ID,
|
||||
),
|
||||
'prefix' => array(
|
||||
'title' => __( 'Invoice prefix', 'woocommerce-paypal-payments' ),
|
||||
'type' => 'text',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue