-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(connector): accept connector_transaction_id in error_response of connector flows for Trustpay #3060
Conversation
} | ||
|
||
#[derive(Deserialize)] | ||
pub struct TrustPayTransactionStatusErrorResponse { | ||
pub status: i64, | ||
pub payment_description: String, | ||
pub instance_id: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This struct is being used in PSync are we getting instance_id in PSync also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
response | ||
.payment_information | ||
.references | ||
.payment_request_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for bank redirects do we get payment_request_id instead of instance_id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we use bank payment_request_id instead of instance_id for bank redirects. Ref page.no 333
of trustpay.rs
@@ -1637,16 +1647,19 @@ pub struct Errors { | |||
} | |||
|
|||
#[derive(Default, Debug, Serialize, Deserialize, PartialEq)] | |||
#[serde(rename_all = "camelCase")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you confirm TrustPayTransactionStatusErrorResponse also requires camelCase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub struct TrustpayErrorResponse { | ||
pub status: i64, | ||
pub description: Option<String>, | ||
pub errors: Option<Vec<Errors>>, | ||
pub instance_id: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't get instance_id
for bank redirects failures right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes instance_id
is not provided during all error scenarios.
Type of Change
Description
Resolves #3543
How did you test it?
Test card number
4200 0000 0000 002
for further test cards, refer here
Expected behavior :
connector_transaction_id
should be populatedconnector_transaction_id
should be populated (Note: For some types error, connector transaction id will not be sent by the connector)Checklist
cargo +nightly fmt --all
cargo clippy