Improved some issues with the payment
This commit is contained in:
@@ -41,7 +41,12 @@ async function post(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
const response = await axios.post<IntentionResult>(
|
||||
"https://oman.paymob.com/v1/intention/",
|
||||
{...intention, payment_methods: [parseInt(process.env.PAYMOB_INTEGRATION_ID || "0")], items: []},
|
||||
{
|
||||
...intention,
|
||||
payment_methods: [parseInt(process.env.PAYMOB_INTEGRATION_ID || "0")],
|
||||
items: [],
|
||||
extras: {...intention.extras, userID: req.session.user!.id},
|
||||
} as PaymentIntention,
|
||||
{headers: {Authorization: `Token ${process.env.PAYMOB_SECRET_KEY}`}},
|
||||
);
|
||||
const intentionResult = response.data;
|
||||
|
||||
Reference in New Issue
Block a user