diff --git a/src/Gateways/GpApiGateway.php b/src/Gateways/GpApiGateway.php
index 782e71d..b7090e9 100644
--- a/src/Gateways/GpApiGateway.php
+++ b/src/Gateways/GpApiGateway.php
@@ -227,8 +227,8 @@ public function woocommerce_globalpayments_gpapi_settings( $settings ) {
echo '
' . __( 'Please provide Live Credentials. Gateway not enabled.' ) . '
';
});
$settings['enabled'] = 'no';
- return $settings;
}
+ return $settings;
}
if ( empty( $settings['sandbox_app_id'] ) || empty( $settings['sandbox_app_key'] ) ) {
add_action( 'admin_notices', function() {
diff --git a/src/Gateways/TransitGateway.php b/src/Gateways/TransitGateway.php
index 4b7e2c0..9d7a5b8 100644
--- a/src/Gateways/TransitGateway.php
+++ b/src/Gateways/TransitGateway.php
@@ -234,10 +234,13 @@ public function process_admin_options() {
$settings = get_option( $option_name );
$prefix = ( wc_string_to_bool( $settings['is_production'] ) ) ? '' : 'sandbox_';
- if ( empty( $settings[$prefix . 'transaction_key'] ) && ! empty( $settings[$prefix . 'user_id'] ) && ! empty( $settings[$prefix . 'password'] ) ) {
+ if ( ! empty( $settings[$prefix . 'user_id'] ) && ! empty( $settings[$prefix . 'password'] ) ) {
try {
+
+ $this->configure_merchant_settings();
$settings[$prefix . 'transaction_key'] = $this->create_transaction_key();
} catch ( \Exception $e ) {
+ $settings[$prefix . 'transaction_key'] = '';
add_action( 'admin_notices', function() {
echo '' . __( 'Invalid MultiPass User ID or Password. Please try again.' ) . '
';
});