Merge branch 'release/2024-01-05' into rome/release/2024-01-05

This commit is contained in:
Patrick Fic
2024-01-05 09:02:01 -08:00
40 changed files with 856 additions and 278 deletions

View File

@@ -50,7 +50,7 @@ exports.createUser = async (req, res) => {
`,
{
user: {
email,
email: email.toLowerCase(),
authid: userRecord.uid,
associations: {
data: [{ shopid, authlevel, active: true }],

View File

@@ -132,6 +132,7 @@ exports.payment_refund = async (req, res) => {
exports.generate_payment_url = async (req, res) => {
logger.log("intellipay-payment-url", "DEBUG", req.user?.email, null, null);
const shopCredentials = await getShopCredentials(req.body.bodyshop);
try {
const options = {
method: "POST",
@@ -139,7 +140,12 @@ exports.generate_payment_url = async (req, res) => {
//TODO: Move these to environment variables/database.
data: qs.stringify({
...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,
//The postback URL is set at the CP teller global terminal settings page.
}),