Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PaymentFailed: Error: Invalid URI "undefinedPaymentRequest.json" #11

Open
ghost opened this issue Oct 19, 2020 · 1 comment
Open

PaymentFailed: Error: Invalid URI "undefinedPaymentRequest.json" #11

ghost opened this issue Oct 19, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 19, 2020

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
Copy link

MerchantID اشتباه هست

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant