We have successfully created an application using the development environment with dwolla API. However, while deploying the same to the production environment, we are getting a 401 while trying to create a new customer.
We have verified the production account (I verified over the phone with Dwolla)
We created an application and granted all permissions available.
We generated a token/refresh token
Here is a snippet of the code:
DwollaSwagger\Configuration::$access_token = $accessToken ;
$apiClient = new DwollaSwagger\ApiClient($dwollaApiUrl); //from db, $dwollaApiUrl = https://api.dwolla.com
$customersApi = new DwollaSwagger\CustomersApi($apiClient);
$customerData = array (
‘firstName’ => $patient->FirstName,
‘lastName’ => $patient->LastName,
‘email’ => $patient->Email,
‘type’ => ‘personal’,
‘address1’ => $address->AddressStreet,
‘city’ => $address->AddressCity,
‘state’ => $address->AdressState,
‘postalCode’ => $address->AddressZip,
‘dateOfBirth’ => $formatedDob ,
‘ssn’ => “1234”, //$patient->SSN
’phone’ => $formatedPhone,
‘ipAddress’ => ‘127.0.0.1’
$new_customer = $customersApi->create($customerData);
The error occurs on the last line of the snippet.
From the message above, I suspect it is a permission issue but I believe we have all the right settings.
Please let us know what are we missing?