Document Upload
Document Upload: Create
Parameters
'file'
fileThe binary data of the file to upload. Only
png
, jpg
, jpeg
, or pdf
files are supported. The file must not exceed 4MB.'kind'
multipleThe type of uploaded document. Value should always be EVIDENCE_DOCUMENT.
Examples
- PHP
$result = $gateway->documentUpload()->create([
'kind' => BraintreeDocumentUpload::EVIDENCE_DOCUMENT,
'file' => fopen('local_file.pdf', 'rb')
]);
if ($result->success) {
# document successfully uploaded
$document = $result->documentUpload;
} else {
echo $result->errors;
}