feat(subscription): include amount_rials in subscription payment mutation
This commit is contained in:
@@ -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('خطا در دریافت لینک پرداخت');
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user