Global configuration added to Forte gateway.

This commit is contained in:
Kishan Patel 2022-04-18 17:53:45 +05:30
parent f4b590228a
commit b935b82a8b
2 changed files with 20 additions and 6 deletions

View File

@ -35,6 +35,13 @@ class ACH
public function __construct(FortePaymentDriver $forte)
{
$this->forte = $forte;
$this->forte_base_uri = $this->forte->company_gateway->getConfigField('baseUri');
$this->forte_api_access_id = $this->forte->company_gateway->getConfigField('apiAccessId');
$this->forte_secure_key = $this->forte->company_gateway->getConfigField('secureKey');
$this->forte_auth_organization_id = $this->forte->company_gateway->getConfigField('authOrganizationId');
$this->forte_organization_id = $this->forte->company_gateway->getConfigField('organizationId');
$this->forte_location_id = $this->forte->company_gateway->getConfigField('locationId');
}
public function authorizeView(array $data)
@ -64,9 +71,9 @@ class ACH
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"first_name": "'.$this->forte->client->name.'",
"last_name": "'.$this->forte->client->name.'",
"company_name": "'.$this->forte->client->name.'",
"first_name": "'.$this->forte->client->present()->name().'",
"last_name": "'.$this->forte->client->present()->name().'",
"company_name": "'.$this->forte->client->present()->name().'",
"customer_id": "'.$this->forte->client->number.'"
}',
CURLOPT_HTTPHEADER => array(

View File

@ -36,6 +36,13 @@ class CreditCard
public function __construct(FortePaymentDriver $forte)
{
$this->forte = $forte;
$this->forte_base_uri = $this->forte->company_gateway->getConfigField('baseUri');
$this->forte_api_access_id = $this->forte->company_gateway->getConfigField('apiAccessId');
$this->forte_secure_key = $this->forte->company_gateway->getConfigField('secureKey');
$this->forte_auth_organization_id = $this->forte->company_gateway->getConfigField('authOrganizationId');
$this->forte_organization_id = $this->forte->company_gateway->getConfigField('organizationId');
$this->forte_location_id = $this->forte->company_gateway->getConfigField('locationId');
}
public function authorizeView(array $data)
@ -67,9 +74,9 @@ class CreditCard
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"first_name": "'.$this->forte->client->name.'",
"last_name": "'.$this->forte->client->name.'",
"company_name": "'.$this->forte->client->name.'",
"first_name": "'.$this->forte->client->present()->name().'",
"last_name": "'.$this->forte->client->present()->name().'",
"company_name": "'.$this->forte->client->present()->name().'",
"customer_id": "'.$this->forte->client->number.'"
}',
CURLOPT_HTTPHEADER => array(