added dynamic bank information on upcoming payouts based on the default bank payout set by the user

This commit is contained in:
jouls 2024-04-30 09:26:24 +08:00
parent ca799e9c23
commit b4b69ba223
1 changed files with 7 additions and 1 deletions

View File

@ -211,7 +211,13 @@ $vendorPayoutData = json_decode($response, true);
$vendorResponse = getVendorbyId($vendorId);
$vendorInformation = json_decode($vendorResponse, true);
$bankAccountNumber = $vendorInformation['bank_acount_details'][0]['bank_account_number'];
$bankName = $vendorInformation['bank_acount_details'][0]['bank_name'];
$bankDetails = $vendorInformation['bank_acount_details'];
foreach ($bankDetails as $details) {
if ($details['bank_payout'] === true) {
$bankName = $details['bank_name'];
$bankAccountNumber = $details['bank_account_number'];
}
}
$bankNumEnding = substr($bankAccountNumber, -3);
?>
Receipient: <?php echo $bankName; ?> Account ending in <?php echo $bankNumEnding?>