Skip to content

Commit

Permalink
fix Local driver bug (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
hos3ein authored Dec 25, 2022
1 parent 8d808e2 commit f1a0867
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Provider/PaymentServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Shetabit\Multipay\Payment;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Str;
use Shetabit\Multipay\Request;
use Shetabit\Payment\Events\InvoicePurchasedEvent;
use Shetabit\Payment\Events\InvoiceVerifiedEvent;
Expand Down Expand Up @@ -64,7 +66,8 @@ public function register()

// use blade to render redirection form
Payment::setRedirectionFormViewRenderer(function ($view, $action, $inputs, $method) {
return view('shetabitPayment::redirectForm')->with(
return Blade::render(
Str::replace('</form>', '@csrf</form>', file_get_contents($view)),
[
'action' => $action,
'inputs' => $inputs,
Expand Down

0 comments on commit f1a0867

Please sign in to comment.