diff --git a/README.md b/README.md index b165482..c213cd4 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ public function handle(TransactionCreated $event) and you'll need to update the route for init component ```php - + ``` Optionally, you can publish the views using diff --git a/resources/views/init.blade.php b/resources/views/init.blade.php index 0294d9e..1b85d52 100644 --- a/resources/views/init.blade.php +++ b/resources/views/init.blade.php @@ -34,6 +34,6 @@ // Default: ['creditcard', 'applepay', 'stcpay'] methods: @json($methods ?? config('moyasar.methods')), - on_complete: '{{ $on_complete ?? route(config('moyasar.on_complete_url')) }}' + on_complete: '{{ $onComplete ?? route(config('moyasar_on_complete_url')) }}' }) diff --git a/src/Components/Init.php b/src/Components/Init.php index 5d8a371..55342d9 100644 --- a/src/Components/Init.php +++ b/src/Components/Init.php @@ -18,7 +18,7 @@ public function __construct( public ?string $element = null, public ?string $description = null, public ?string $callback = null, - public ?string $on_complete = null, + public ?string $onComplete = null, public ?array $methods = null ) { if ($this->amount < 0) {