up
This commit is contained in:
@@ -17,7 +17,7 @@ export class PaymentGatewayService {
|
||||
/**
|
||||
* Generate payment gateway redirect URL for online payment methods
|
||||
*/
|
||||
generateRedirectUrl(order: Order, restaurantPaymentMethod: RestaurantPaymentMethod): Promise<PaymentGatewayRedirect> {
|
||||
generateRedirectUrl(order: Order, restaurantPaymentMethod: RestaurantPaymentMethod): PaymentGatewayRedirect {
|
||||
const paymentMethod = restaurantPaymentMethod.paymentMethod;
|
||||
|
||||
if (!paymentMethod.isOnline) {
|
||||
@@ -56,7 +56,7 @@ export class PaymentGatewayService {
|
||||
callbackUrl: string;
|
||||
description: string;
|
||||
},
|
||||
) {
|
||||
): string {
|
||||
// Convert amount to smallest currency unit (e.g., Toman to Rials for Iranian gateways)
|
||||
const amountInSmallestUnit = Math.round(params.amount * 10); // Assuming Toman to Rials conversion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user