From 7f77bbe5b36de0f71d72a6cb0716ac8518261537 Mon Sep 17 00:00:00 2001 From: Lie Albert Tri Adrian Date: Wed, 9 Aug 2017 13:51:03 +0700 Subject: [PATCH] add disbursement description --- src/XenditPHPClient.php | 4 ++++ ...e_disbursement_with_description_example.php | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/examples/create_disbursement_with_description_example.php 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); +?>