# Testing "retry" correction in the sandbox

**URL:** <https://discuss.dwolla.com/t/testing-retry-correction-in-the-sandbox/6544>\
**Category:** Customers\
**Created:** [December 18, 2020, 4:18am UTC](https://discuss.dwolla.com/t/testing-retry-correction-in-the-sandbox/6544 "2020-12-18T04:18:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://discuss.dwolla.com/u/Pat)\
**Post date:** [December 18, 2020, 4:18am UTC](https://discuss.dwolla.com/t/testing-retry-correction-in-the-sandbox/6544/1 "2020-12-18T04:18:22Z")

</div>

I’ve successfully create a customer in the sandbox with a status of “retry”. I’m trying to update that customer to “Verified” by resending all the personal information along with a 9 digit ssn. I keep getting an error message from Dwolla saying “Invalid Ssn”. I don’t see anything specific in the Developer guide that says this is even possible in the sandbox but it seems like it should be.

Data sent:  
{  
address1: “123 Main St”  
city: “Some City”  
dateOfBirth: “1991-05-05”  
dwollaCustomerId: “faad2389-c22a-42ee-a954-a4c3694f7fa8”  
email: “[test@test.com](mailto:test@test.com)”  
firstName: “test”  
lastName: “test”  
postalCode: “12345”  
ssn: “5555-55-5555”  
state: “NY”  
type: “personal”  
}

---

<div class="post-metadata">

**Author:** ![kmoreira](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/kmoreira/32/2718_2.png) [@kmoreira](https://discuss.dwolla.com/u/kmoreira)\
**Post date:** [December 18, 2020, 2:04pm UTC](https://discuss.dwolla.com/t/testing-retry-correction-in-the-sandbox/6544/2 "2020-12-18T14:04:38Z")

</div>

Hi @Pat! Looks like the SNN in the code is 10 digits. Can you try a 9 digit SSN and let us know if you run into any further trouble?

---

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://discuss.dwolla.com/u/Pat)\
**Post date:** [December 18, 2020, 4:42pm UTC](https://discuss.dwolla.com/t/testing-retry-correction-in-the-sandbox/6544/3 "2020-12-18T16:42:46Z")

</div>

Doy 🙃 Thank you.

New question, any suggestions for where I might find php syntax for creating a customer document in PHP?

---

<div class="post-metadata">

**Author:** ![kmoreira](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/kmoreira/32/2718_2.png) [@kmoreira](https://discuss.dwolla.com/u/kmoreira)\
**Post date:** [December 18, 2020, 5:32pm UTC](https://discuss.dwolla.com/t/testing-retry-correction-in-the-sandbox/6544/4 "2020-12-18T17:32:58Z")

</div>

Hi @Pat. Unfortunately we do not have a PHP code snippet for creating a customer document at this time, but here are some other PHP resources as it relates to this function.

[List Documents for a Customer](https://docs.dwolla.com/#create-a-document-for-a-customer)  
[Dwolla Swagger PHP](https://github.com/Dwolla/dwolla-swagger-php)

I’ve also created a ticket for this so we can add this snippet in out docs for the developers in our PHP community. Thank you for pointing this out!

---

<div class="post-metadata">

**Author:** ![Pat](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@Pat](https://discuss.dwolla.com/u/Pat)\
**Post date:** [December 20, 2020, 9:33am UTC](https://discuss.dwolla.com/t/testing-retry-correction-in-the-sandbox/6544/5 "2020-12-20T09:33:57Z")

</div>

I’m still fighting with document upload. My latest error is

{“code”:“ValidationError”,“message”:“Validation error(s) present. See embedded errors list for more details.”,"\_embedded":{“errors”:[{“code”:“Invalid”,“message”:“Invalid file type.”,“path”:"/file","\_links":{}}]}}

The customer id is: 30f89075-93e7-490c-809f-bbab467a2012

Is this enough information for you to check the logs on your end and maybe give me a little more information.

Thanks, Pat

---

<div class="post-metadata">

**Author:** ![spencer](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/spencer/32/2143_2.png) [@spencer](https://discuss.dwolla.com/u/spencer)\
**Post date:** [December 21, 2020, 1:25pm UTC](https://discuss.dwolla.com/t/testing-retry-correction-in-the-sandbox/6544/6 "2020-12-21T13:25:41Z")

</div>

Hi @Pat,

We do have a [Drop-in component](https://developers.dwolla.com/guides/drop-ins) for the document upload function that you could take a look at if you’re running into troubles with doing this entirely server-side. You can find a quick how-to in [this blog](https://www.dwolla.com/updates/low-code-drop-in-components/#part-04).

##### Server-side document upload

The PHP client library doesn’t currently contain support for document upload unfortunately. You could look at pulling in an external REST client to make this call. After looking at the [Guzzle docs](http://docs.guzzlephp.org/en/stable/request-options.html#multipart), this seemed to work for me:

```
<?php
require 'autoload.php';
use GuzzleHttp\Client;
$dwollaHost = 'api-sandbox.dwolla.com';
$token = 'SOMEACCESSTOKEN';
$filePath = 'https://cdn.dwolla.com/images/sandbox-test-images/test-document-upload-fail.png';
$customerID = 'cde723c7-65d7-4b40-8e7b-a5a4b42e285c';
$client = new \GuzzleHttp\Client();
$url = 'https://' . $dwollaHost . '/customers/' . $customerID . '/documents';
try {
  $response = $client->request('POST', $url, [
    'headers' => [
          'Authorization' => 'Bearer ' . $token,
          'Accept' => 'application/vnd.dwolla.v1.hal+json'
    ],  
    'multipart' => [
          [
              'name' => 'documentType',
              'contents' => 'license',
          ],
          [
              'name' => 'file',
              'contents' => fopen($filePath, 'r'),
          ]
      ]
  ]);
  echo $response->getHeader('Location')[0];
} catch (\Exception $e) {
  echo $e->getMessage();
  $response = $e->getResponse();
  $responseBody = $response->getBody()->getContents();
  echo $responseBody;
  exit;
}

```

> [@Pat](#):
>
> {“code”:“ValidationError”,“message”:“Validation error(s) present. See embedded errors list for more details.”,“\_embedded”:{“errors”:[{“code”:“Invalid”,“message”:“Invalid file type.”,“path”:“/file”,“\_links”:{}}]}}

Keep in mind, the only file format types supported are .png, .jpeg, .jpg, and .pdf (if business).

Hope this helps!
