Minor intellipay change.
This commit is contained in:
@@ -132,6 +132,7 @@ exports.payment_refund = async (req, res) => {
|
|||||||
exports.generate_payment_url = async (req, res) => {
|
exports.generate_payment_url = async (req, res) => {
|
||||||
logger.log("intellipay-payment-url", "DEBUG", req.user?.email, null, null);
|
logger.log("intellipay-payment-url", "DEBUG", req.user?.email, null, null);
|
||||||
const shopCredentials = await getShopCredentials(req.body.bodyshop);
|
const shopCredentials = await getShopCredentials(req.body.bodyshop);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const options = {
|
const options = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -139,7 +140,12 @@ exports.generate_payment_url = async (req, res) => {
|
|||||||
//TODO: Move these to environment variables/database.
|
//TODO: Move these to environment variables/database.
|
||||||
data: qs.stringify({
|
data: qs.stringify({
|
||||||
...shopCredentials,
|
...shopCredentials,
|
||||||
...req.body,
|
//...req.body,
|
||||||
|
amount: Dinero({ amount: Math.round(req.body.amount * 100) }).toFormat(
|
||||||
|
"0.00"
|
||||||
|
),
|
||||||
|
account: req.body.account,
|
||||||
|
invoice: req.body.invoice,
|
||||||
createshorturl: true,
|
createshorturl: true,
|
||||||
//The postback URL is set at the CP teller global terminal settings page.
|
//The postback URL is set at the CP teller global terminal settings page.
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user