-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(connector): [Peachpayments] Add Webhook Flow and Support For merchant_order_reference_id #9781
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
base: main
Are you sure you want to change the base?
Conversation
…chant_order_reference_id
Changed Files
|
routing, | ||
card, | ||
amount, | ||
rrn: item.router_data.request.merchant_order_reference_id.clone(), |
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.
Why are we not using connector_request_reference_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.
We have confirmed with Peach team that rrn
is a field which merchant will send per transaction.
pub error_message: Option<String>, | ||
pub response_code: Option<ResponseCode>, | ||
pub ecommerce_card_payment_only_transaction_data: Option<EcommerceCardPaymentOnlyResponseData>, | ||
pub payment_method: 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.
Should this be secret?
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.
Made it a secret field.
Ok(api_models::webhooks::IncomingWebhookEvent::PaymentIntentSuccess) | ||
} | ||
peachpayments::PeachpaymentsPaymentStatus::Pending | ||
| peachpayments::PeachpaymentsPaymentStatus::Authorized |
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.
Why is authorized marked as processing?
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.
Fixed it.
request: &webhooks::IncomingWebhookRequestDetails<'_>, | ||
) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> { | ||
Err(report!(errors::ConnectorError::WebhooksNotImplemented)) | ||
let webhook_body: peachpayments::PeachpaymentsIncomingWebhook = request |
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.
Modify psync response so that it can handle webhook response as well
Type of Change
Closes this issue
Description
Added Webhook Flow and Support for merchant_order_reference_id for Peachpayments
Additional Changes
Motivation and Context
How did you test it?
verify_webhook_source
totrue
Response:
200 OK Status
Incoming Webhook Screenshot:
Checklist
cargo +nightly fmt --all
cargo clippy