Skip to content

Commit 4628cc6

Browse files
committed
Added check same code add new line..
1 parent bdf8fdb commit 4628cc6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Jobs/CreatePaymentMethod.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ public function handle()
3131

3232
$code = 'offline-payments.' . Str::slug($this->request->get('name'), '_') . '.' . (count($methods) + 1);
3333

34+
foreach ($methods as $method) {
35+
if (Str::contains($method['code'], 'offline-payments.' . Str::slug($this->request->get('name'), '_') . '.')) {
36+
return $method;
37+
}
38+
}
39+
3440
$payment_method = [
3541
'code' => $code,
3642
'name' => $this->request->get('name'),

0 commit comments

Comments
 (0)