Initialize \Razorpay\Api\Api client
This commit is contained in:
parent
4c1dd8e03a
commit
eaa94bdebe
1 changed files with 11 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ class RazorpayPaymentDriver extends BaseDriver
|
|||
|
||||
public $can_authorise_credit_card = false;
|
||||
|
||||
public $gateway;
|
||||
public \Razorpay\Api\Api $gateway;
|
||||
|
||||
public $payment_method;
|
||||
|
||||
|
|
@ -39,6 +39,16 @@ class RazorpayPaymentDriver extends BaseDriver
|
|||
|
||||
const SYSTEM_LOG_TYPE = SystemLog::TYPE_RAZORPAY;
|
||||
|
||||
public function init(): self
|
||||
{
|
||||
$this->gateway = new \Razorpay\Api\Api(
|
||||
$this->company_gateway->getConfigField('apiKey'),
|
||||
$this->company_gateway->getConfigField('apiSecret'),
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function gatewayTypes(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue