Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Commit 9abc5b1

Browse files
author
Chirag Patel
committed
decimal payment issue handaling
1 parent 44afb85 commit 9abc5b1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

service/src/services/checkout/checkout.class.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ var getThisSubscription = async function (id, app) {
9494
var createFunction = async (function(data,params, app) {
9595
// console.log("+++++++++++ params",params.query.authorization)
9696
var thisSubscription = await (getThisSubscription(data.sub_id, app))
97-
console.log('thisSubscription', thisSubscription)
97+
// console.log('thisSubscription', thisSubscription)
9898
if(thisSubscription === undefined || thisSubscription === null) {
9999
return {error: 'please select valid subscription plan'}
100100
}
@@ -119,8 +119,9 @@ var createFunction = async (function(data,params, app) {
119119
console.log('Error', err)
120120
return {error: err}
121121
}))
122-
if(checkout_res.hasOwnProperty('statusCode')) {
123-
return {error: checkout_res.message}
122+
123+
if(checkout_res.hasOwnProperty('error')) {
124+
return {error: 'Payment service not available, Please try after sometime'}
124125
} else {
125126
console.log('payment Successfully Done!')
126127
let userDetail = await (getUserPackage(config.headers.authorization))

0 commit comments

Comments
 (0)