wip
This commit is contained in:
1 parent
df70431042
commit
9a9afc9218
2 files changed
+12
-1
No files matched your search
@@ -406,3 +406,14 @@ function createHalkbankOrder($price = 123): array
|
|||||||
'orderId' => $paymentResponse['orderId'],
|
'orderId' => $paymentResponse['orderId'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Original quality :D
|
||||||
|
*/
|
||||||
|
function convertToOriginalFormat(int|float|string $apiPrice): string
|
||||||
|
{
|
||||||
|
$originalPrice = intval($apiPrice) / 100;
|
||||||
|
|
||||||
|
return number_format($originalPrice, 2, '.', '');
|
||||||
|
}
|
||||||
@@ -41,7 +41,7 @@ public function index(Request $request)
|
|||||||
status: $payment_status,
|
status: $payment_status,
|
||||||
message: $payment_status ? 'Töleg geçdi' : 'Töleg geçmedi',
|
message: $payment_status ? 'Töleg geçdi' : 'Töleg geçmedi',
|
||||||
pnr: $response['orderNumber'],
|
pnr: $response['orderNumber'],
|
||||||
price_amount: number_format($response['amount']),
|
price_amount: convertToOriginalFormat($response['amount']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user