diff --git a/app/PaymentDrivers/Authorize/AuthorizeCreateCustomer.php b/app/PaymentDrivers/Authorize/AuthorizeCreateCustomer.php index ce2534f08bb5..7a158115d698 100644 --- a/app/PaymentDrivers/Authorize/AuthorizeCreateCustomer.php +++ b/app/PaymentDrivers/Authorize/AuthorizeCreateCustomer.php @@ -45,11 +45,12 @@ class AuthorizeCreateCustomer { error_reporting (E_ALL & ~E_DEPRECATED); - $merchantAuthentication = $this->authorize->init(); + $this->authorize->init(); // Create the Bill To info for new payment type $contact = $this->client->primary_contact()->first(); - + $refId = 'ref' . time(); + // Create a new CustomerProfileType and add the payment profile object $customerProfile = new CustomerProfileType(); $customerProfile->setDescription($this->client->present()->name()); @@ -58,7 +59,7 @@ class AuthorizeCreateCustomer // Assemble the complete transaction request $request = new CreateCustomerProfileRequest(); - $request->setMerchantAuthentication($merchantAuthentication); + $request->setMerchantAuthentication($this->authorize->merchant_authentication); $request->setRefId($refId); $request->setProfile($customerProfile); diff --git a/app/PaymentDrivers/AuthorizePaymentDriver.php b/app/PaymentDrivers/AuthorizePaymentDriver.php index 530c9bbdce4e..8cfd0cc84445 100644 --- a/app/PaymentDrivers/AuthorizePaymentDriver.php +++ b/app/PaymentDrivers/AuthorizePaymentDriver.php @@ -44,7 +44,7 @@ class AuthorizePaymentDriver extends BaseDriver return $types; } - + public function init() { error_reporting (E_ALL & ~E_DEPRECATED); @@ -69,7 +69,7 @@ class AuthorizePaymentDriver extends BaseDriver } - private function mode() + public function mode() { 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) ->where('company_gateway_id', $this->company_gateway->id)