mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Prasunna Soppa <70575890+prasunna09@users.noreply.github.com>
14 lines
435 B
JavaScript
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"));
|