mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
feat(connector): Add Incremental Authorization flow for Paypal (#8517)
Co-authored-by: Anurag Singh <anurag.singh.001@MacBookPro.lan> Co-authored-by: Anurag Singh <anurag.singh.001@Anurag-Singh-WPMHJ5619X.local> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -3967,14 +3967,38 @@ Cypress.Commands.add("incrementalAuth", (globalState, data) => {
|
||||
.to.have.property("amount")
|
||||
.to.be.a("number")
|
||||
.to.equal(resData.body.amount).and.not.be.null;
|
||||
expect(
|
||||
response.body.incremental_authorizations[key],
|
||||
"error_code"
|
||||
).to.have.property("error_code").to.be.null;
|
||||
expect(
|
||||
response.body.incremental_authorizations[key],
|
||||
"error_message"
|
||||
).to.have.property("error_message").to.be.null;
|
||||
if (
|
||||
response.body.incremental_authorizations[key].status === "failure"
|
||||
) {
|
||||
expect(response.body.incremental_authorizations[key], "error_code")
|
||||
.to.have.property("error_code")
|
||||
.to.be.equal(
|
||||
resData.body.incremental_authorizations[key].error_code
|
||||
);
|
||||
expect(
|
||||
response.body.incremental_authorizations[key],
|
||||
"error_message"
|
||||
)
|
||||
.to.have.property("error_message")
|
||||
.to.be.equal(
|
||||
resData.body.incremental_authorizations[key].error_message
|
||||
);
|
||||
expect(response.body.incremental_authorizations[key], "status")
|
||||
.to.have.property("status")
|
||||
.to.equal("failure");
|
||||
} else {
|
||||
expect(
|
||||
response.body.incremental_authorizations[key],
|
||||
"error_code"
|
||||
).to.have.property("error_code").to.be.null;
|
||||
expect(
|
||||
response.body.incremental_authorizations[key],
|
||||
"error_message"
|
||||
).to.have.property("error_message").to.be.null;
|
||||
expect(response.body.incremental_authorizations[key], "status")
|
||||
.to.have.property("status")
|
||||
.to.equal("success");
|
||||
}
|
||||
expect(
|
||||
response.body.incremental_authorizations[key],
|
||||
"previously_authorized_amount"
|
||||
@ -3985,9 +4009,6 @@ Cypress.Commands.add("incrementalAuth", (globalState, data) => {
|
||||
response.body.incremental_authorizations[key]
|
||||
.previously_authorized_amount
|
||||
).and.not.be.null;
|
||||
expect(response.body.incremental_authorizations[key], "status")
|
||||
.to.have.property("status")
|
||||
.to.equal("success");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user