Skip to content

Commit

Permalink
update redirect url on the config file and controller
Browse files Browse the repository at this point in the history
  • Loading branch information
aemaddin committed Nov 28, 2019
1 parent 5a24fee commit 5325cc8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
4 changes: 2 additions & 2 deletions config/knet.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
| The merchant URL where Payment Gateway send the authorization response
|
*/
'response_url' => env('KENT_RESPONSE_URL') ?? url('/knet/response'),
'response_url' => env('KENT_RESPONSE_URL') ?? '/knet/response',

/*
|--------------------------------------------------------------------------
Expand All @@ -56,7 +56,7 @@
| error while processing the transaction.
|
*/
'error_url' => env('KENT_ERROR_URL') ?? url('/knet/error'),
'error_url' => env('KENT_ERROR_URL') ?? '/knet/error',
'success_url' => env('KENT_SUCCESS_URL', '/'),

/*
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/KnetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function handleKnet(Request $request)
*/
protected function successMethod($parameters = [])
{
return redirect(config('knet.success_url'));
return redirect(url(config('knet.success_url')));
}

/**
Expand Down
12 changes: 1 addition & 11 deletions src/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,6 @@ public function downloadAs($filename, array $data)
]);
}

/**
* Get the Stripe transaction instance.
*
* @return \Stripe\Invoice
*/
public function asStripeInvoice()
{
return $this->transaction;
}

/**
* Dynamically get values from the Stripe transaction.
*
Expand All @@ -161,4 +151,4 @@ public function __get($key)
{
return $this->transaction->{$key};
}
}
}

0 comments on commit 5325cc8

Please sign in to comment.