Commit 30ee366260f29c466b15a5cd6be5ea82fc28d886

Authored by Adhidarma Hadiwinoto
1 parent 00ec5d1997
Exists in master

Stringify struk

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -132,7 +132,9 @@ exports.report = async (data, xid, retry) => {
132 132 info: data.info,
133 133 detail: data.detail,
134 134 data: data.data,
135   - struk: data.struk,
  135 + struk: (typeof data.struk === 'string' && data.struk)
  136 + || (data.struk && JSON.stringify(data.struk))
  137 + || null,
136 138 };
137 139  
138 140 logger.verbose('POSTPAID2-SDK: Going to report to CORE', {