Skip to content

Commit 4f958e2

Browse files
committed
feat: show Test account badge consistently for all payment methods
- Added testmode property to Bizum, PayPal, Multibanco, and MBWay gateways - Added account_id to PayPal gateway (was missing) - All payment methods now consistently show Test account badge when using test API keys
1 parent d2d0cd8 commit 4f958e2

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

src/Gateways/PaymentMethods/WCGatewayMoneiBizum.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public function __construct(
6868
$this->api_key = $this->getApiKey();
6969
$this->account_id = $this->getAccountId();
7070
$this->shop_name = get_bloginfo( 'name' );
71+
$this->testmode = $this->getTestmode();
7172
$this->logging = ( ! empty( get_option( 'monei_debug' ) ) && 'yes' === get_option( 'monei_debug' ) ) ? true : false;
7273

7374
// IPN callbacks

src/Gateways/PaymentMethods/WCGatewayMoneiMBWay.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public function __construct(
6262
$this->api_key = $this->getApiKey();
6363
$this->account_id = $this->getAccountId();
6464
$this->shop_name = get_bloginfo( 'name' );
65+
$this->testmode = $this->getTestmode();
6566
$this->logging = ( ! empty( get_option( 'monei_debug' ) ) && 'yes' === get_option( 'monei_debug' ) ) ? true : false;
6667

6768
// IPN callbacks

src/Gateways/PaymentMethods/WCGatewayMoneiMultibanco.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public function __construct(
6161
$this->api_key = $this->getApiKey();
6262
$this->account_id = $this->getAccountId();
6363
$this->shop_name = get_bloginfo( 'name' );
64+
$this->testmode = $this->getTestmode();
6465
$this->logging = ( ! empty( get_option( 'monei_debug' ) ) && 'yes' === get_option( 'monei_debug' ) ) ? true : false;
6566

6667
// IPN callbacks

src/Gateways/PaymentMethods/WCGatewayMoneiPaypal.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ public function __construct(
6565
$this->description = ( ! empty( $this->get_option( 'description' ) ) ) ? $this->get_option( 'description' ) : '';
6666
$this->status_after_payment = ( ! empty( $this->get_option( 'orderdo' ) ) ) ? $this->get_option( 'orderdo' ) : '';
6767
$this->api_key = $this->getApiKey();
68+
$this->account_id = $this->getAccountId();
6869
$this->shop_name = get_bloginfo( 'name' );
70+
$this->testmode = $this->getTestmode();
6971
$this->pre_auth = ( ! empty( $this->get_option( 'pre-authorize' ) && 'yes' === $this->get_option( 'pre-authorize' ) ) ) ? true : false;
7072
$this->logging = ( ! empty( $this->get_option( 'debug' ) ) && 'yes' === $this->get_option( 'debug' ) ) ? true : false;
7173

0 commit comments

Comments
 (0)