feat(connector): [Itau Bank] Add payment and sync flow for Pix (#5342)

This commit is contained in:
Sakil Mostak
2024-07-22 16:07:22 +05:30
committed by GitHub
parent ca749b3259
commit 3fef96e727
41 changed files with 768 additions and 144 deletions

View File

@ -666,10 +666,26 @@ Cypress.Commands.add(
expect(response.body)
.to.have.property("next_action")
.to.have.property("qr_code_url");
globalState.set(
"nextActionUrl", // This is intentionally kept as nextActionUrl to avoid issues during handleRedirection call,
response.body.next_action.qr_code_url
);
if (response.body.next_action.qr_code_url !== null) {
globalState.set(
"nextActionUrl", // This is intentionally kept as nextActionUrl to avoid issues during handleRedirection call,
response.body.next_action.qr_code_url
);
globalState.set(
"nextActionType",
"qr_code_url"
);
}
else{
globalState.set(
"nextActionUrl", // This is intentionally kept as nextActionUrl to avoid issues during handleRedirection call,
response.body.next_action.image_data_url
);
globalState.set(
"nextActionType",
"image_data_url"
);
}
break;
default:
expect(response.body)
@ -1327,12 +1343,14 @@ Cypress.Commands.add(
let connectorId = globalState.get("connectorId");
let expected_url = new URL(expected_redirection);
let redirection_url = new URL(globalState.get("nextActionUrl"));
let next_action_type = globalState.get("nextActionType")
cy.log(payment_method_type);
handleRedirection(
"bank_transfer",
{ redirection_url, expected_url },
connectorId,
payment_method_type
payment_method_type,
{ next_action_type }
);
}
);