Skip to content

Commit f1a0867

Browse files
authored
fix Local driver bug (#263)
1 parent 8d808e2 commit f1a0867

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Provider/PaymentServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use Shetabit\Multipay\Payment;
66
use Illuminate\Support\ServiceProvider;
7+
use Illuminate\Support\Facades\Blade;
8+
use Illuminate\Support\Str;
79
use Shetabit\Multipay\Request;
810
use Shetabit\Payment\Events\InvoicePurchasedEvent;
911
use Shetabit\Payment\Events\InvoiceVerifiedEvent;
@@ -64,7 +66,8 @@ public function register()
6466

6567
// use blade to render redirection form
6668
Payment::setRedirectionFormViewRenderer(function ($view, $action, $inputs, $method) {
67-
return view('shetabitPayment::redirectForm')->with(
69+
return Blade::render(
70+
Str::replace('</form>', '@csrf</form>', file_get_contents($view)),
6871
[
6972
'action' => $action,
7073
'inputs' => $inputs,

0 commit comments

Comments
 (0)