diff --git a/src/Adapter/Saman.php b/src/Adapter/Saman.php index 7211fe7..2985330 100755 --- a/src/Adapter/Saman.php +++ b/src/Adapter/Saman.php @@ -115,7 +115,7 @@ protected function generateFormWithoutToken(): string 'redirectUrl' => $this->redirect_url, 'submitLabel' => !empty($this->submit_label) ? $this->submit_label : trans("larapay::larapay.goto_gate"), 'autoSubmit' => boolval($this->auto_submit), - ]); + ])->__toString(); } protected function formParamsWithoutToken(): array @@ -328,8 +328,10 @@ public function getGatewayReferenceId(): string */ protected function getWSDL($type = null): string { + + $type = $type !== null ? strtoupper($type) : null; if (config('larapay.mode') == 'production') { - switch (strtoupper($type)) { + switch ($type) { case 'TOKEN': return $this->tokenWSDL; break; @@ -338,7 +340,7 @@ protected function getWSDL($type = null): string break; } } else { - switch (strtoupper($type)) { + switch ($type) { case 'TOKEN': return $this->testTokenWSDL; break;