text changes and remove infra folder
This commit is contained in:
@@ -116,7 +116,7 @@ class StripeService {
|
||||
destination,
|
||||
metadata,
|
||||
},
|
||||
idempotencyKey ? { idempotencyKey } : undefined
|
||||
idempotencyKey ? { idempotencyKey } : undefined,
|
||||
);
|
||||
|
||||
return transfer;
|
||||
@@ -236,7 +236,7 @@ class StripeService {
|
||||
metadata,
|
||||
reason,
|
||||
},
|
||||
idempotencyKey ? { idempotencyKey } : undefined
|
||||
idempotencyKey ? { idempotencyKey } : undefined,
|
||||
);
|
||||
|
||||
return refund;
|
||||
@@ -265,7 +265,7 @@ class StripeService {
|
||||
paymentMethodId,
|
||||
amount,
|
||||
customerId,
|
||||
metadata = {}
|
||||
metadata = {},
|
||||
) {
|
||||
try {
|
||||
// Generate idempotency key to prevent duplicate charges for same rental
|
||||
@@ -282,13 +282,11 @@ class StripeService {
|
||||
customer: customerId, // Include customer ID
|
||||
confirm: true, // Automatically confirm the payment
|
||||
off_session: true, // Indicate this is an off-session payment
|
||||
return_url: `${
|
||||
process.env.FRONTEND_URL || "http://localhost:3000"
|
||||
}/complete-payment`,
|
||||
return_url: `${process.env.FRONTEND_URL}/complete-payment`,
|
||||
metadata,
|
||||
expand: ["latest_charge.payment_method_details"], // Expand to get payment method details
|
||||
},
|
||||
idempotencyKey ? { idempotencyKey } : undefined
|
||||
idempotencyKey ? { idempotencyKey } : undefined,
|
||||
);
|
||||
|
||||
// Check if additional authentication is required
|
||||
|
||||
Reference in New Issue
Block a user