Skip to content

Commit 88ece0a

Browse files
committed
pay bill field added
1 parent 3706ce9 commit 88ece0a

2 files changed

Lines changed: 28 additions & 28 deletions

File tree

src/Http/Resources/PayBillCollection.php

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,47 +19,47 @@ public function toArray($request)
1919
{
2020
return $this->collection->map(function ($pay_bill) {
2121
$data = [
22-
'id' => $pay_bill->getKey(),
23-
'source_country_id' => $pay_bill->source_country_id ?? null,
22+
'id' => $payBill->getKey(),
23+
'source_country_id' => $payBill->source_country_id ?? null,
2424
'source_country_name' => null,
25-
'destination_country_id' => $pay_bill->destination_country_id ?? null,
25+
'destination_country_id' => $payBill->destination_country_id ?? null,
2626
'destination_country_name' => null,
27-
'parent_id' => $pay_bill->parent_id ?? null,
28-
'sender_receiver_id' => $pay_bill->sender_receiver_id ?? null,
27+
'parent_id' => $payBill->parent_id ?? null,
28+
'sender_receiver_id' => $payBill->sender_receiver_id ?? null,
2929
'sender_receiver_name' => null,
30-
'user_id' => $pay_bill->user_id ?? null,
30+
'user_id' => $payBill->user_id ?? null,
3131
'user_name' => null,
32-
'service_id' => $pay_bill->service_id ?? null,
32+
'service_id' => $payBill->service_id ?? null,
3333
'service_name' => null,
3434
'service_type' => null,
35-
'transaction_form_id' => $pay_bill->transaction_form_id ?? null,
36-
'transaction_form_name' => $pay_bill->transaction_form_name ?? null,
37-
'ordered_at' => $pay_bill->ordered_at ?? null,
38-
'amount' => $pay_bill->amount ?? null,
39-
'currency' => $pay_bill->currency ?? null,
40-
'converted_amount' => $pay_bill->converted_amount ?? null,
41-
'converted_currency' => $pay_bill->converted_currency ?? null,
42-
'order_number' => $pay_bill->order_number ?? null,
43-
'risk' => $pay_bill->risk ?? null,
44-
'notes' => $pay_bill->notes ?? null,
45-
'is_refunded' => $pay_bill->is_refunded ?? null,
46-
'order_data' => $pay_bill->order_data ?? null,
47-
'status' => $pay_bill->status ?? null,
48-
];
35+
'transaction_form_id' => $payBill->transaction_form_id ?? null,
36+
'transaction_form_name' => $payBill->transaction_form_name ?? null,
37+
'ordered_at' => $payBill->ordered_at ?? null,
38+
'amount' => $payBill->amount ?? null,
39+
'currency' => $payBill->currency ?? null,
40+
'converted_amount' => $payBill->converted_amount ?? null,
41+
'converted_currency' => $payBill->converted_currency ?? null,
42+
'order_number' => $payBill->order_number ?? null,
43+
'risk' => $payBill->risk ?? null,
44+
'notes' => $payBill->notes ?? null,
45+
'is_refunded' => $payBill->is_refunded ?? null,
46+
'order_data' => $payBill->order_data ?? null,
47+
'status' => $payBill->status ?? null,
48+
] + $payBill->commonAttributes();
4949

5050
if (Core::packageExists('MetaData')) {
51-
$data['source_country_name'] = $pay_bill->sourceCountry?->name ?? null;
52-
$data['destination_country_name'] = $pay_bill->destinationCountry?->name ?? null;
51+
$data['source_country_name'] = $payBill->sourceCountry?->name ?? null;
52+
$data['destination_country_name'] = $payBill->destinationCountry?->name ?? null;
5353
}
5454

5555
if (Core::packageExists('Auth')) {
56-
$data['sender_receiver_name'] = $pay_bill->senderReceiver?->name ?? null;
57-
$data['user_name'] = $pay_bill->user?->name ?? null;
56+
$data['sender_receiver_name'] = $payBill->senderReceiver?->name ?? null;
57+
$data['user_name'] = $payBill->user?->name ?? null;
5858
}
5959

6060
if (Core::packageExists('Business')) {
61-
$data['service_name'] = $pay_bill->service?->service_name ?? null;
62-
$data['service_type'] = $pay_bill->service->serviceType?->all_parent_list ?? null;
61+
$data['service_name'] = $payBill->service?->service_name ?? null;
62+
$data['service_type'] = $payBill->service->serviceType?->all_parent_list ?? null;
6363
}
6464

6565
return $data;

src/Http/Resources/PayBillResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function toArray($request)
4343
'is_refunded' => $this->is_refunded ?? null,
4444
'order_data' => $this->order_data ?? null,
4545
'status' => $this->status ?? null,
46-
];
46+
] + $this->commonAttributes();
4747

4848
if (Core::packageExists('MetaData')) {
4949
$data['source_country_name'] = $this->sourceCountry?->name ?? null;

0 commit comments

Comments
 (0)