diff --git a/src/gateways/Gateway.php b/src/gateways/Gateway.php index f6d0fd2..f77bbc5 100644 --- a/src/gateways/Gateway.php +++ b/src/gateways/Gateway.php @@ -173,7 +173,7 @@ public function getSettingsHtml() if ($paymentForm && $paymentForm->hasProperty('nonce') && $paymentForm->nonce) { $request['token'] = $paymentForm->nonce; } - $request['merchantAccountId'] = $this->merchantAccountId[$request['currency']]; + $request['merchantAccountId'] = Craft::parseEnv($this->merchantAccountId[$request['currency']]); //Craft::dd($request); }*/ @@ -313,7 +313,7 @@ public function purchase(Transaction $transaction, BasePaymentForm $form): Reque $data['paymentMethodToken'] = $form->token; } if (isset($this->merchantAccountId[$transaction->currency]) && !empty($this->merchantAccountId[$transaction->currency])) { - $data['merchantAccountId'] = $this->merchantAccountId[$transaction->currency]; + $data['merchantAccountId'] = Craft::parseEnv($this->merchantAccountId[$transaction->currency]); } else { $data['merchantAccountId'] = ""; $data['amount'] = $transaction->amount; @@ -530,7 +530,7 @@ public function subscribe(User $user, BasePlan $plan, SubscriptionForm $paramete 'paymentMethodToken' => $source->token, 'planId' => $plan->reference, 'price' => $plan->price, - 'merchantAccountId' => $this->merchantAccountId[$plan->getCurrency()], + 'merchantAccountId' => Craft::parseEnv($this->merchantAccountId[$plan->getCurrency()]), ]; $response = $this->createSubscription($data);