mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
check duplicate refunds
This commit is contained in:
@@ -38,4 +38,23 @@ final class TransactionType {
|
||||
|
||||
public const BILL_REFUND = 16;
|
||||
|
||||
}
|
||||
public const ID_TO_NAME = [
|
||||
self::PAYMENT_ATTEMPT => "PAYMENT_ATTEMPT",
|
||||
self::PAYMENT => "PAYMENT",
|
||||
self::INVOICE => "INVOICE",
|
||||
self::BILL => "BILL",
|
||||
self::PROFORMA => "PROFORMA",
|
||||
self::TOP_UP => "TOP_UP",
|
||||
self::REFUND => "REFUND",
|
||||
self::PURCHASE_ORDER => "PURCHASE_ORDER",
|
||||
self::SUPPLIER_DELIVER => "SUPPLIER_DELIVER",
|
||||
self::CREDIT_NOTE => "CREDIT_NOTE",
|
||||
self::DEBIT_NOTE => "DEBIT_NOTE",
|
||||
self::WITHDRAW => "WITHDRAW",
|
||||
self::TRANSFER_FEE => "TRANSFER_FEE",
|
||||
self::CASH_BACK => "CASH_BACK",
|
||||
self::SUPPLIER_PAYMENT => "SUPPLIER_PAYMENT",
|
||||
self::SUPPLIER_REFUND => "SUPPLIER_REFUND",
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,8 @@ class BookingResource extends JsonResource
|
||||
->whereDate('expires_on', '>=', Carbon::now())
|
||||
->get()
|
||||
),
|
||||
'expired_payment_attempts' => TransactionResource::collection($this->transactions()->payments()->where('status', ApprovalStatus::PENDING_SUBMISSION)->whereDate('expires_on', '>=', Carbon::now())->where('expires_on', '>', Carbon::now()->toTimeString())->get()),
|
||||
// 'expired_payment_attempts' => TransactionResource::collection($this->transactions()->payments()->where('status', ApprovalStatus::PENDING_SUBMISSION)->whereDate('expires_on', '>=', Carbon::now())->where('expires_on', '>', Carbon::now()->toTimeString())->get()),
|
||||
'expired_payment_attempts' => TransactionResource::collection($this->transactions()->payments()->where('status', ApprovalStatus::EXPIRED)->get()),
|
||||
'payment_history' => TransactionResource::collection($this->transactions()->where(function($query){
|
||||
$query->where(function($query){
|
||||
$query->payments()->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::COMPLETED, ApprovalStatus::REJECTED, ApprovalStatus::REFUNDED]);
|
||||
|
||||
Reference in New Issue
Block a user