Skip to content

Commit fd901f7

Browse files
committed
[fix] saman gateway view generate fix, saman getWSDL type fixed
1 parent dda78cf commit fd901f7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Adapter/Saman.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ protected function generateFormWithoutToken(): string
115115
'redirectUrl' => $this->redirect_url,
116116
'submitLabel' => !empty($this->submit_label) ? $this->submit_label : trans("larapay::larapay.goto_gate"),
117117
'autoSubmit' => boolval($this->auto_submit),
118-
]);
118+
])->__toString();
119119
}
120120

121121
protected function formParamsWithoutToken(): array
@@ -328,8 +328,10 @@ public function getGatewayReferenceId(): string
328328
*/
329329
protected function getWSDL($type = null): string
330330
{
331+
332+
$type = $type !== null ? strtoupper($type) : null;
331333
if (config('larapay.mode') == 'production') {
332-
switch (strtoupper($type)) {
334+
switch ($type) {
333335
case 'TOKEN':
334336
return $this->tokenWSDL;
335337
break;
@@ -338,7 +340,7 @@ protected function getWSDL($type = null): string
338340
break;
339341
}
340342
} else {
341-
switch (strtoupper($type)) {
343+
switch ($type) {
342344
case 'TOKEN':
343345
return $this->testTokenWSDL;
344346
break;

0 commit comments

Comments
 (0)