mirror of
https://github.com/juspay/hyperswitch.git
synced 2026-03-13 09:02:06 +08:00
chore(postman): update Postman collection files
This commit is contained in:
@@ -2946,22 +2946,27 @@
|
||||
" );",
|
||||
"}",
|
||||
"",
|
||||
"// Response body should have value \"24\" for \"error_code\"",
|
||||
"// Allow both legacy and new CVV error codes",
|
||||
"const allowedErrors = [\"cvv_invalid\", \"card_cvv_length_invalid\"];",
|
||||
"",
|
||||
"// Validate error_code field if present in response",
|
||||
"if (jsonData?.error_code) {",
|
||||
" pm.test(",
|
||||
" \"[POST]::/payments/:id/confirm - Content check if value for 'error_code' matches 'cvv_invalid'\",",
|
||||
" \"[POST]::/payments/:id/confirm - Validate error_code for invalid CVV\",",
|
||||
" function () {",
|
||||
" pm.expect(jsonData.error_code).to.eql(\"cvv_invalid\");",
|
||||
" // Check that returned error_code is one of the allowed CVV error variants",
|
||||
" pm.expect(allowedErrors).to.include(jsonData.error_code);",
|
||||
" },",
|
||||
" );",
|
||||
"}",
|
||||
"",
|
||||
"// Response body should have value \"24\" for \"error_message\"",
|
||||
"// Validate error_message field if present in response",
|
||||
"if (jsonData?.error_message) {",
|
||||
" pm.test(",
|
||||
" \"[POST]::/payments/:id/confirm - Content check if value for 'error_message' matches 'cvv_invalid'\",",
|
||||
" \"[POST]::/payments/:id/confirm - Validate error_message for invalid CVV\",",
|
||||
" function () {",
|
||||
" pm.expect(jsonData.error_message).to.eql(\"cvv_invalid\");",
|
||||
" // Check that returned error_message matches expected CVV error variants",
|
||||
" pm.expect(allowedErrors).to.include(jsonData.error_message);",
|
||||
" },",
|
||||
" );",
|
||||
"}"
|
||||
|
||||
Reference in New Issue
Block a user