¨4.0.1¨
This commit is contained in:
@@ -13,19 +13,17 @@ class Instamojo implements GatewayInterface
|
||||
public $label;
|
||||
public $description;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->label = setting('instamojo_label');
|
||||
$this->description = setting('instamojo_description');
|
||||
}
|
||||
|
||||
public function client()
|
||||
{
|
||||
$endpoint = setting('instamojo_test_mode') ? 'https://test.instamojo.com/api/1.1/' : null;
|
||||
|
||||
return new \Instamojo\Instamojo(setting('instamojo_api_key'), setting('instamojo_auth_token'), $endpoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
*/
|
||||
public function purchase(Order $order, Request $request)
|
||||
{
|
||||
if (currency() !== 'INR') {
|
||||
@@ -51,13 +49,23 @@ class Instamojo implements GatewayInterface
|
||||
return new InstamojoResponse($order, $response);
|
||||
}
|
||||
|
||||
private function getRedirectUrl($order)
|
||||
|
||||
public function client()
|
||||
{
|
||||
return route('checkout.complete.store', ['orderId' => $order->id, 'paymentMethod' => 'instamojo']);
|
||||
$endpoint = setting('instamojo_test_mode') ? 'https://test.instamojo.com/api/1.1/' : null;
|
||||
|
||||
return new \Instamojo\Instamojo(setting('instamojo_api_key'), setting('instamojo_auth_token'), $endpoint);
|
||||
}
|
||||
|
||||
|
||||
public function complete(Order $order)
|
||||
{
|
||||
return new InstamojoResponse($order, request()->all());
|
||||
}
|
||||
|
||||
|
||||
private function getRedirectUrl($order)
|
||||
{
|
||||
return route('checkout.complete.store', ['orderId' => $order->id, 'paymentMethod' => 'instamojo']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user