Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
mah-shamim authored and github-actions[bot] committed May 4, 2024
1 parent 4c6c495 commit 66edc2c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 36 deletions.
54 changes: 27 additions & 27 deletions src/Http/Controllers/VendorTestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,33 +62,33 @@ public function islamiBankSpotCash(): void
//$order = $repo->find(265);
//$order_data = $order->order_data;
$order = [
"id" => 265,
"source_country_id" => 231,
"destination_country_id" => 19,
"parent_id" => null,
"sender_receiver_id" => 10,
"user_id" => 6,
"service_id" => 13,
"transaction_form_id" => 6,
"ordered_at" => "2024-04-22 09:49:47",
"amount" => "10000.000000",
"currency" => "BDT",
"converted_amount" => "131.995776",
"converted_currency" => "AED",
"order_number" => "ARE00000000000000265",
"risk_profile" => "green",
"notes" => null,
"is_refunded" => 0,
"order_data" => '{"bank_id": 18, "user_name": "Test User 1", "created_at": "2024-04-22T09:49:48.694109Z", "created_by": "Test User 1", "fund_source": "Bank Deposit", "assign_order": "no", "request_from": "web", "service_name": "Bank Transfer", "service_slug": "bank_transfer", "account_number": "88023456789", "bank_branch_id": 3142, "beneficiary_id": 35, "current_amount": 585.997246, "previous_amount": 585.997246, "purchase_number": "ARE00000000000000265", "beneficiary_data": {"reference_no": "MCM00000000000000265", "bank_information": {"bank_data": {"swift_code": "IBBLBDDH", "islami_bank_code": 42}, "bank_name": "Islami Bank Bangladesh Limited", "bank_slug": "islami_bank_bangladesh_limited"}, "branch_information": {"branch_data": {"routing_no": "100154364", "islami_bank_branch_code": 213}, "branch_name": "Head Office Complex"}, "sender_information": {"name": "Test User 1", "email": "[email protected]", "mobile": "01600000007", "profile": {"id_doc": {"id_no": "12345678", "id_type": "passport", "id_issue_at": "2024-02-04T00:00:00.000000Z", "id_expired_at": "2029-02-04T00:00:00.000000Z", "id_no_duplicate": "no", "id_issue_country": "Bangladesh"}, "blacklisted": "no", "profile_data": {"note": "Testing", "gender": "male", "occupation": "service", "father_name": "Mustak Ahmed", "mother_name": "Hamida Begum", "nationality": "Bangladeshi", "marital_status": "unmarried", "source_of_income": "salary"}, "date_of_birth": "1999-02-04T00:00:00.000000Z", "present_address": {"address": "Mohammadpur", "city_id": 16152, "state_id": 866, "city_data": null, "city_name": "Ajax", "post_code": "1234", "country_id": 39, "state_data": [], "state_name": "Ontario", "country_data": {"is_serving": true, "language_enabled": true, "multi_currency_enabled": true}, "country_name": "Canada"}}, "currency": "CAD", "language": "en", "fcm_token": "8uqMfhCq6ieLiTm2EKZHDs6eDf76Gv6iFvF8oAiD"}, "receiver_information": {"city_id": 8486, "state_id": 771, "city_data": null, "city_name": "Dhaka", "country_id": 19, "state_data": [], "state_name": "Dhaka District", "relation_id": 3, "country_data": {"is_serving": true, "language_enabled": true, "multi_currency_enabled": true}, "country_name": "Bangladesh", "relation_data": null, "relation_name": "Brother In Law", "beneficiary_data": {"email": "[email protected]", "bank_id": 18, "cash_id": 18, "bank_name": "Islami Bank Bangladesh Limited", "cash_name": "Islami Bank Bangladesh Limited", "last_name": null, "wallet_id": null, "first_name": null, "wallet_name": null, "account_name": "recip1 bank", "bank_branch_id": 3142, "instant_bank_id": null, "bank_branch_name": "Head Office Complex", "account_type_code": "02", "instant_bank_name": null, "bank_account_number": "88023456789", "cash_account_number": null, "wallet_account_number": null, "instant_bank_branch_id": null, "instant_bank_branch_name": null, "instant_bank_account_number": null}, "beneficiary_name": "test.instant test.instant", "beneficiary_mobile": "01600000007", "beneficiary_address": null, "beneficiary_type_id": 1, "beneficiary_type_name": "Bank Transfer"}}, "master_user_name": "Afghanistan Master User", "service_stat_data": {"charge": "5%", "discount": "5%", "commission": "3%", "charge_refund": "yes", "discount_refund": "yes", "service_stat_id": 6257, "commission_refund": "yes", "charge_break_down_id": null}, "remittance_purpose": "Family Maintenance or Savings", "beneficiary_type_id": 1, "currency_convert_rate": {"rate": 75.76, "input": "BDT", "amount": "10000", "output": "AED", "converted": 131.99577613516365, "amount_formatted": "AED 10,000.00", "converted_formatted": "BDT 132.00"}, "created_by_mobile_number": "01600000007", "system_notification_variable_failed": "bank_transfer_failed", "system_notification_variable_success": "bank_transfer_success"}',
"status" => "successful",
"creator_id" => null,
"editor_id" => null,
"destroyer_id" => null,
"restorer_id" => null,
"created_at" => "2024-04-22 09:49:48",
"updated_at" => "2024-04-22 09:49:48",
"deleted_at" => null,
"restored_at" => null,
'id' => 265,
'source_country_id' => 231,
'destination_country_id' => 19,
'parent_id' => null,
'sender_receiver_id' => 10,
'user_id' => 6,
'service_id' => 13,
'transaction_form_id' => 6,
'ordered_at' => '2024-04-22 09:49:47',
'amount' => '10000.000000',
'currency' => 'BDT',
'converted_amount' => '131.995776',
'converted_currency' => 'AED',
'order_number' => 'ARE00000000000000265',
'risk_profile' => 'green',
'notes' => null,
'is_refunded' => 0,
'order_data' => '{"bank_id": 18, "user_name": "Test User 1", "created_at": "2024-04-22T09:49:48.694109Z", "created_by": "Test User 1", "fund_source": "Bank Deposit", "assign_order": "no", "request_from": "web", "service_name": "Bank Transfer", "service_slug": "bank_transfer", "account_number": "88023456789", "bank_branch_id": 3142, "beneficiary_id": 35, "current_amount": 585.997246, "previous_amount": 585.997246, "purchase_number": "ARE00000000000000265", "beneficiary_data": {"reference_no": "MCM00000000000000265", "bank_information": {"bank_data": {"swift_code": "IBBLBDDH", "islami_bank_code": 42}, "bank_name": "Islami Bank Bangladesh Limited", "bank_slug": "islami_bank_bangladesh_limited"}, "branch_information": {"branch_data": {"routing_no": "100154364", "islami_bank_branch_code": 213}, "branch_name": "Head Office Complex"}, "sender_information": {"name": "Test User 1", "email": "[email protected]", "mobile": "01600000007", "profile": {"id_doc": {"id_no": "12345678", "id_type": "passport", "id_issue_at": "2024-02-04T00:00:00.000000Z", "id_expired_at": "2029-02-04T00:00:00.000000Z", "id_no_duplicate": "no", "id_issue_country": "Bangladesh"}, "blacklisted": "no", "profile_data": {"note": "Testing", "gender": "male", "occupation": "service", "father_name": "Mustak Ahmed", "mother_name": "Hamida Begum", "nationality": "Bangladeshi", "marital_status": "unmarried", "source_of_income": "salary"}, "date_of_birth": "1999-02-04T00:00:00.000000Z", "present_address": {"address": "Mohammadpur", "city_id": 16152, "state_id": 866, "city_data": null, "city_name": "Ajax", "post_code": "1234", "country_id": 39, "state_data": [], "state_name": "Ontario", "country_data": {"is_serving": true, "language_enabled": true, "multi_currency_enabled": true}, "country_name": "Canada"}}, "currency": "CAD", "language": "en", "fcm_token": "8uqMfhCq6ieLiTm2EKZHDs6eDf76Gv6iFvF8oAiD"}, "receiver_information": {"city_id": 8486, "state_id": 771, "city_data": null, "city_name": "Dhaka", "country_id": 19, "state_data": [], "state_name": "Dhaka District", "relation_id": 3, "country_data": {"is_serving": true, "language_enabled": true, "multi_currency_enabled": true}, "country_name": "Bangladesh", "relation_data": null, "relation_name": "Brother In Law", "beneficiary_data": {"email": "[email protected]", "bank_id": 18, "cash_id": 18, "bank_name": "Islami Bank Bangladesh Limited", "cash_name": "Islami Bank Bangladesh Limited", "last_name": null, "wallet_id": null, "first_name": null, "wallet_name": null, "account_name": "recip1 bank", "bank_branch_id": 3142, "instant_bank_id": null, "bank_branch_name": "Head Office Complex", "account_type_code": "02", "instant_bank_name": null, "bank_account_number": "88023456789", "cash_account_number": null, "wallet_account_number": null, "instant_bank_branch_id": null, "instant_bank_branch_name": null, "instant_bank_account_number": null}, "beneficiary_name": "test.instant test.instant", "beneficiary_mobile": "01600000007", "beneficiary_address": null, "beneficiary_type_id": 1, "beneficiary_type_name": "Bank Transfer"}}, "master_user_name": "Afghanistan Master User", "service_stat_data": {"charge": "5%", "discount": "5%", "commission": "3%", "charge_refund": "yes", "discount_refund": "yes", "service_stat_id": 6257, "commission_refund": "yes", "charge_break_down_id": null}, "remittance_purpose": "Family Maintenance or Savings", "beneficiary_type_id": 1, "currency_convert_rate": {"rate": 75.76, "input": "BDT", "amount": "10000", "output": "AED", "converted": 131.99577613516365, "amount_formatted": "AED 10,000.00", "converted_formatted": "BDT 132.00"}, "created_by_mobile_number": "01600000007", "system_notification_variable_failed": "bank_transfer_failed", "system_notification_variable_success": "bank_transfer_success"}',
'status' => 'successful',
'creator_id' => null,
'editor_id' => null,
'destroyer_id' => null,
'restorer_id' => null,
'created_at' => '2024-04-22 09:49:48',
'updated_at' => '2024-04-22 09:49:48',
'deleted_at' => null,
'restored_at' => null,
];
$order_data = json_decode($order['order_data'], true);
$order_data['beneficiary_data']['reference_no'] = 'TEST'.time();
Expand Down
19 changes: 10 additions & 9 deletions src/Vendors/IslamiBankApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,24 +185,24 @@ public function directCreditRemittance(array $data): array
$xmlString .= '<xsd:amount>'.($data['sending_amount'] ?? null).'</xsd:amount>';
$xmlString .= '<xsd:isoCode>'.($data['sending_currency'] ?? null).'</xsd:isoCode>';

if($data['service_slug'] == 'bank_transfer'){
if ($data['service_slug'] == 'bank_transfer') {
$xmlString .= '<xsd:beneficiaryAccNo>'.($data['beneficiary_data']['bank_account_number'] ?? null).'</xsd:beneficiaryAccNo>';
if($data['beneficiary_data']['bank_information']['bank_slug'] == 'islami_bank_bangladesh_limited'){
if ($data['beneficiary_data']['bank_information']['bank_slug'] == 'islami_bank_bangladesh_limited') {
$xmlString .= '<xsd:beneficiaryAccType>'.($data['beneficiary_data']['beneficiaryAccType'] ?? null).'</xsd:beneficiaryAccType>';
$xmlString .= '<xsd:beneficiaryBranchCode>'.($data['beneficiary_data']['branch_information']['branch_data']['islami_bank_branch_code'] ?? null).'</xsd:beneficiaryBranchCode>';
$xmlString .= '<xsd:paymentType>2</xsd:paymentType>';
}else{
} else {
$xmlString .= '<xsd:beneficiaryAccType>?</xsd:beneficiaryAccType>';
$xmlString .= '<xsd:beneficiaryBranchCode>?</xsd:beneficiaryBranchCode>';
$xmlString .= '<xsd:paymentType>3</xsd:paymentType>';
}
}elseif($data['receiver_information']['beneficiary_type_name'] == 'cash_pickup'){
} elseif ($data['receiver_information']['beneficiary_type_name'] == 'cash_pickup') {
$xmlString .= '<xsd:beneficiaryAccNo>?</xsd:beneficiaryAccNo>';
if($data['beneficiary_data']['bank_information']['bank_slug'] == 'islami_bank_bangladesh_limited'){
if ($data['beneficiary_data']['bank_information']['bank_slug'] == 'islami_bank_bangladesh_limited') {
$xmlString .= '<xsd:beneficiaryAccType>?</xsd:beneficiaryAccType>';
$xmlString .= '<xsd:beneficiaryBranchCode>'.($data['beneficiary_data']['branch_information']['branch_data']['islami_bank_branch_code'] ?? null).'</xsd:beneficiaryBranchCode>';
$xmlString .= '<xsd:paymentType>1</xsd:paymentType>';
}else{
} else {
$xmlString .= '<xsd:beneficiaryAccType>?</xsd:beneficiaryAccType>';
$xmlString .= '<xsd:paymentType>3</xsd:paymentType>';
}
Expand All @@ -220,9 +220,9 @@ public function directCreditRemittance(array $data): array
$xmlString .= '<xsd:remitterAddress>'.($data['beneficiary_data']['sender_information']['profile']['present_address']['city_name'] ?? null).'</xsd:remitterAddress>';
$xmlString .= '<xsd:remitterCountry>'.($data['beneficiary_data']['sender_information']['profile']['present_address']['country_name'] ?? null).'</xsd:remitterCountry>';
$xmlString .= '<xsd:identityType>'.($data['beneficiary_data']['sender_information']['profile']['id_doc']['id_type'] ?? null).'</xsd:identityType>';
if($data['beneficiary_data']['sender_information']['profile']['id_doc']['id_type'] == 'passport'){
if ($data['beneficiary_data']['sender_information']['profile']['id_doc']['id_type'] == 'passport') {
$xmlString .= '<xsd:remitterPassportNo>'.($data['beneficiary_data']['sender_information']['profile']['id_doc']['id_no'] ?? null).'</xsd:remitterPassportNo>';
}else{
} else {
$xmlString .= '<xsd:remitterIdentificationNo>'.($data['beneficiary_data']['sender_information']['profile']['id_doc']['id_no'] ?? null).'</xsd:remitterIdentificationNo>';
}
$xmlString .= '<xsd:remitterName'.($data['beneficiary_data']['sender_information']['name'] ?? null).'</xsd:remitterName>';
Expand Down Expand Up @@ -395,7 +395,8 @@ public function validateBeneficiaryWallet(array $data): array
private function connectionCheck($xml_post_string, $method): array
{
$xml_string = $this->xmlGenerate($xml_post_string, $method);
dump($method.'<br>'.$xml_string);exit();
dump($method.'<br>'.$xml_string);
exit();
$response = Http::soap($this->apiUrl, $method, $xml_string);

// $headers = [
Expand Down

0 comments on commit 66edc2c

Please sign in to comment.