mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			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"));
 | 
