Working on Authorize.net

This commit is contained in:
David Bomba 2020-06-10 18:11:53 +10:00
parent 15081c2875
commit 78f99140d8
2 changed files with 7 additions and 6 deletions

View File

@ -45,10 +45,11 @@ class AuthorizeCreateCustomer
{ {
error_reporting (E_ALL & ~E_DEPRECATED); error_reporting (E_ALL & ~E_DEPRECATED);
$merchantAuthentication = $this->authorize->init(); $this->authorize->init();
// Create the Bill To info for new payment type // Create the Bill To info for new payment type
$contact = $this->client->primary_contact()->first(); $contact = $this->client->primary_contact()->first();
$refId = 'ref' . time();
// Create a new CustomerProfileType and add the payment profile object // Create a new CustomerProfileType and add the payment profile object
$customerProfile = new CustomerProfileType(); $customerProfile = new CustomerProfileType();
@ -58,7 +59,7 @@ class AuthorizeCreateCustomer
// Assemble the complete transaction request // Assemble the complete transaction request
$request = new CreateCustomerProfileRequest(); $request = new CreateCustomerProfileRequest();
$request->setMerchantAuthentication($merchantAuthentication); $request->setMerchantAuthentication($this->authorize->merchant_authentication);
$request->setRefId($refId); $request->setRefId($refId);
$request->setProfile($customerProfile); $request->setProfile($customerProfile);

View File

@ -69,7 +69,7 @@ class AuthorizePaymentDriver extends BaseDriver
} }
private function mode() public function mode()
{ {
if($this->company_gateway->getConfigField('testMode')) if($this->company_gateway->getConfigField('testMode'))
@ -116,7 +116,7 @@ class AuthorizePaymentDriver extends BaseDriver
} }
private function findClientGatewayRecord() :?ClientGatewayToken public function findClientGatewayRecord() :?ClientGatewayToken
{ {
return ClientGatewayToken::where('client_id', $this->client->id) return ClientGatewayToken::where('client_id', $this->client->id)
->where('company_gateway_id', $this->company_gateway->id) ->where('company_gateway_id', $this->company_gateway->id)