wip
This commit is contained in:
@@ -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 @@ class OnlinePaymentController extends Controller
|
|||||||
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