Files
Kashif 5c4e7c9031 refactor: add mapping for ConnectorError in payouts flow (#2608)
Co-authored-by: Kashif <kashif@protonmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kashif <mohammed.kashif@juspay.in>
2023-11-21 07:34:22 +00:00

14 lines
435 B
JavaScript

// Set response object as internal variable
let jsonData = {};
try {
jsonData = pm.response.json();
} catch (e) {}
// pm.collectionVariables - Set payment_id as variable for jsonData.payment_id
if (jsonData?.payment_id) {
pm.collectionVariables.set("payment_id", jsonData.payment_id);
console.log("[LOG]::payment_id - " + jsonData.payment_id);
}
console.log("[LOG]::x-request-id - " + pm.response.headers.get("x-request-id"));