-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat(connector): [FISERV] Added PayPal Redirect Payment Method #8669
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
Conversation
Changed Files
|
@@ -959,6 +991,17 @@ static FISERV_SUPPORTED_PAYMENT_METHODS: LazyLock<SupportedPaymentMethods> = Laz | |||
}, | |||
); | |||
|
|||
fiserv_supported_payment_methods.add( | |||
enums::PaymentMethod::Wallet, | |||
enums::PaymentMethodType::Paypal, |
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.
Please add
- the changes in crates/connector_configs/toml as well for both googlepay, paypal
(dashboard ui wasm changes) - the changes in config/deployments/toml (country,currency changes)
}, | ||
interactions: FiservInteractions { | ||
channel: "WEB".to_string(), | ||
customer_confirmation: "REVIEW_AND_PAY".to_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.
nitpick: Could we replace the hardcoded strings with enums + Serde renames for better type safety?
Something like:
#[derive(Serialize)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
enum CustomerConfirmation {
ReviewAndPay,
PayNow, // can be added later
}
Using enums here is a good-to-have — it avoids potential bugs from typos in string literals (which the compiler won't catch) and makes future changes easier to manage
@@ -651,17 +917,29 @@ impl TryFrom<&FiservRouterData<&types::PaymentsCaptureRouterData>> for FiservCap | |||
.change_context(errors::ConnectorError::InvalidConnectorConfig { | |||
config: "Merchant connector account metadata", | |||
})?; | |||
|
|||
let order_id = item |
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 this order id field added in capture 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.
order_id
gotten from Authorize response needs to be passed in Capture call.
Ref: https://developer.fiserv.com/product/CommerceHub/api/?type=post&path=/checkouts/v1/orders&branch=main&version=1.25.1000
(Click on the Capture dropdown)
Dashboard config changes missing for Fiserv Paypal |
a6fda18
Type of Change
Description
Added PayPal Redirect Payment Flow. First we Create an Order and then in the return_url, customer gets redirected. After that we Capture the funds.
Note: We are getting a missing fields error from the connector, possibly because this particular payment method hasn't been enabled from the connector dashboard.
Additional Changes
Motivation and Context
Ref: https://developer.fiserv.com/product/CommerceHub/api/?type=post&path=/checkouts/v1/orders&branch=main&version=1.25.1000
How did you test it?
Payments Create Paypal Redirect
cURL:
Response:
Cypress test
Fiserv
cargo +nightly fmt --all
cargo clippy