PaymentFailed: Error: Invalid URI "undefinedPaymentRequest.json"
Opened this issue · 1 comments
Deleted user commented
Hi.
const ZarinpalCheckout = require('zarinpal-checkout')
const zarinpal = ZarinpalCheckout.create(process.env.MERCHENT_CODE, true);
let { userId } = req;
let { amount } = req.body;
let user = await User.findByPk(userId);
console.log(process.env.UI_PAYMENT_CALLBACK); // http://localhost:4000/payments/callback
let response = await zarinpal.PaymentRequest({
Amount: Number(amount),
CallbackURL: process.env.UI_PAYMENT_CALLBACK,
Description: 'شارژ اکانت',
Email: user.email,
Mobile: user.phone
}); // this line throw error.
what is my mistake
ali-tafakkori commented
MerchantID اشتباه هست