diff --git a/src/XenditPHPClient.php b/src/XenditPHPClient.php index 1420c03..bc86930 100644 --- a/src/XenditPHPClient.php +++ b/src/XenditPHPClient.php @@ -59,6 +59,10 @@ function createDisbursement ($external_id, $amount, $bank_code, $account_holder_ $data['account_holder_name'] = $account_holder_name; $data['account_number'] = $account_number; + if (!empty($disbursement_options['description'])) { + $data['description'] = $disbursement_options['description']; + } + $payload = json_encode($data); curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); diff --git a/src/examples/create_disbursement_with_description_example.php b/src/examples/create_disbursement_with_description_example.php new file mode 100644 index 0000000..b6583b5 --- /dev/null +++ b/src/examples/create_disbursement_with_description_example.php @@ -0,0 +1,18 @@ +createDisbursement($external_id, $amount, $bank_code, $account_holder_name, $account_number, $disbursement_options); + print_r($response); +?>