feat(subscription): include amount_rials in subscription payment mutation

This commit is contained in:
hamed
2026-06-15 13:02:06 +03:30
parent 3763c83471
commit 5fd45b429e
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ function SmsWalletPageInner() {
mutationFn: ({ amount_rials }: ChargeForm) =>
api.post<{ data: { payment_url: string } }>('/api/v1/sms/wallet/charge', { gateway, amount_rials }),
onSuccess: (res: any) => {
const url = res?.data?.payment_url;
const url = res?.data?.redirect_url ?? res?.data?.payment_url;
if (url) window.location.href = url;
else toast.error('خطا در دریافت لینک پرداخت');
},