mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	feat(connector): [Fiuu] Add support for cards recurring payments (#6361)
Co-authored-by: Chikke Srujan <chikke.srujan@Chikke-Srujan-N7WRTY72X7.local> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -1843,7 +1843,11 @@ Cypress.Commands.add( | ||||
|             const nextActionUrl = response.body.next_action.redirect_to_url; | ||||
|             cy.log(nextActionUrl); | ||||
|           } else if (response.body.authentication_type === "no_three_ds") { | ||||
|             expect(response.body.status).to.equal("succeeded"); | ||||
|             if (response.body.connector === "fiuu") { | ||||
|               expect(response.body.status).to.equal("failed"); | ||||
|             } else { | ||||
|               expect(response.body.status).to.equal("succeeded"); | ||||
|             } | ||||
|           } else { | ||||
|             throw new Error( | ||||
|               `Invalid authentication type ${response.body.authentication_type}` | ||||
| @ -2446,51 +2450,55 @@ Cypress.Commands.add( | ||||
|   } | ||||
| ); | ||||
|  | ||||
| Cypress.Commands.add("updateConfig", (configType, configData, globalState, value) => { | ||||
|   const base_url = globalState.get("baseUrl"); | ||||
|   const merchant_id = globalState.get("merchantId"); | ||||
|   const api_key = globalState.get("adminApiKey"); | ||||
| Cypress.Commands.add( | ||||
|   "updateConfig", | ||||
|   (configType, configData, globalState, value) => { | ||||
|     const base_url = globalState.get("baseUrl"); | ||||
|     const merchant_id = globalState.get("merchantId"); | ||||
|     const api_key = globalState.get("adminApiKey"); | ||||
|  | ||||
|   let key; | ||||
|   let url; | ||||
|   let body; | ||||
|    | ||||
|   switch (configType) { | ||||
|     case 'autoRetry': | ||||
|       key = `should_call_gsm_${merchant_id}`;  | ||||
|       url = `${base_url}/configs/${key}`; | ||||
|       body = { key: key, value: value }; | ||||
|       break; | ||||
|     case 'maxRetries': | ||||
|       key = `max_auto_retries_enabled_${merchant_id}`;  | ||||
|       url = `${base_url}/configs/${key}`; | ||||
|       body = { key: key, value: value }; | ||||
|       break; | ||||
|     case 'stepUp': | ||||
|       key = `step_up_enabled_${merchant_id}`;  | ||||
|       url = `${base_url}/configs/${key}`; | ||||
|       body = { key: key, value: value }; | ||||
|       break; | ||||
|     default: | ||||
|       throw new Error(`Invalid config type passed into the configs: "${api_key}: ${value}"`); | ||||
|   } | ||||
|     let key; | ||||
|     let url; | ||||
|     let body; | ||||
|  | ||||
|   cy.request({ | ||||
|     method: 'POST', | ||||
|     url: url, | ||||
|     headers: { | ||||
|       "Content-Type": "application/json", | ||||
|       "api-key": api_key, | ||||
|     }, | ||||
|     body: body, | ||||
|     failOnStatusCode: false, | ||||
|   }).then((response) => { | ||||
|     logRequestId(response.headers["x-request-id"]); | ||||
|      | ||||
|     if (response.status === 200) { | ||||
|       expect(response.body).to.have.property("key").to.equal(key); | ||||
|       expect(response.body).to.have.property("value").to.equal(value); | ||||
|     switch (configType) { | ||||
|       case "autoRetry": | ||||
|         key = `should_call_gsm_${merchant_id}`; | ||||
|         url = `${base_url}/configs/${key}`; | ||||
|         body = { key: key, value: value }; | ||||
|         break; | ||||
|       case "maxRetries": | ||||
|         key = `max_auto_retries_enabled_${merchant_id}`; | ||||
|         url = `${base_url}/configs/${key}`; | ||||
|         body = { key: key, value: value }; | ||||
|         break; | ||||
|       case "stepUp": | ||||
|         key = `step_up_enabled_${merchant_id}`; | ||||
|         url = `${base_url}/configs/${key}`; | ||||
|         body = { key: key, value: value }; | ||||
|         break; | ||||
|       default: | ||||
|         throw new Error( | ||||
|           `Invalid config type passed into the configs: "${api_key}: ${value}"` | ||||
|         ); | ||||
|     } | ||||
|   }); | ||||
| }); | ||||
|  | ||||
|     cy.request({ | ||||
|       method: "POST", | ||||
|       url: url, | ||||
|       headers: { | ||||
|         "Content-Type": "application/json", | ||||
|         "api-key": api_key, | ||||
|       }, | ||||
|       body: body, | ||||
|       failOnStatusCode: false, | ||||
|     }).then((response) => { | ||||
|       logRequestId(response.headers["x-request-id"]); | ||||
|  | ||||
|       if (response.status === 200) { | ||||
|         expect(response.body).to.have.property("key").to.equal(key); | ||||
|         expect(response.body).to.have.property("value").to.equal(value); | ||||
|       } | ||||
|     }); | ||||
|   } | ||||
| ); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 chikke srujan
					chikke srujan