webfast 0.1.89 → 0.1.92
Sign up to get free protection for your applications and to get access to all the features.
package/modules/payment/init.js
CHANGED
@@ -31,7 +31,7 @@ module.exports = {
|
|
31
31
|
//const configRead = JSON.parse(program.fs.readFileSync(program.path.join(program.set.path,`payment.config.json`),`UTF-8`));
|
32
32
|
const configRead = {
|
33
33
|
"mollie" : {
|
34
|
-
"active" : process.env.MOLLIE_ACTIVE,
|
34
|
+
"active" : Boolean(process.env.MOLLIE_ACTIVE),
|
35
35
|
"key" : process.env.MOLLIE_KEY,
|
36
36
|
"partnerId" : process.env.MOLLIE_PARTNER_ID,
|
37
37
|
"profileId" : process.env.MOLLIE_PROFILE_ID,
|
@@ -103,15 +103,18 @@ module.exports = async function(program,json) {
|
|
103
103
|
// Now we have message id set that to the order
|
104
104
|
|
105
105
|
// Add update to message order thingy
|
106
|
+
let setArray = {
|
107
|
+
state : newState,
|
108
|
+
payment : paymentUUID,
|
109
|
+
messages : [telegramSend.result.uuid]
|
110
|
+
}
|
111
|
+
setArray.ref = order.ref;
|
106
112
|
|
113
|
+
order.state.payReqCreated = Date.now();
|
107
114
|
const updated =await program.modules.data.update(process.env.dbName,`order`,{
|
108
115
|
uuid : order.uuid
|
109
116
|
},{
|
110
|
-
$set:
|
111
|
-
state : newState,
|
112
|
-
payment : paymentUUID,
|
113
|
-
messages : [telegramSend.result.uuid]
|
114
|
-
}
|
117
|
+
$set: setArray
|
115
118
|
});
|
116
119
|
console.log(`Telegram Send`);
|
117
120
|
} catch (err) {
|