-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(core): add one-way TLS support with CA certificate for ArchiPEL UAT environment #8128
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changed Files
|
jagan-jaya
previously approved these changes
May 24, 2025
da2e7b4
to
72d451f
Compare
likhinbopanna
previously approved these changes
May 25, 2025
dgeee13
commented
May 25, 2025
@@ -5123,7 +5123,7 @@ pub async fn tokenize_card_flow( | |||
); | |||
let builder = | |||
tokenize::NetworkTokenizationBuilder::<tokenize::TokenizeWithPmId>::default(); | |||
execute_payment_method_tokenization(executor, builder, payment_method).await | |||
Box::pin(execute_payment_method_tokenization(executor, builder, payment_method)).await |
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.
SanchithHegde
approved these changes
May 25, 2025
likhinbopanna
approved these changes
May 25, 2025
deepanshu-iiitu
approved these changes
May 25, 2025
jagan-jaya
approved these changes
May 25, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
ArchiPEL requires one-way TLS in their UAT environment to verify incoming requests. To support this:
A CA certificate must be provided and included with each request to enable proper server verification.
NOTE: The PEM certificate must be converted to a JSON-safe string format (i.e., escaped \n as \r\n or \n). (Please comment if you think there's any better way of doing this)
Additional Changes
Motivation and Context
How did you test it?
Please note, testing needs to be done for the following scenarios
1. Create Archipel connector
curl --location 'http://localhost:8080/account/flowbird/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_9BVJpIiKysTwOVEDlenKkv7JRiJed0NlzE6DSD2PPC0GwNgbQYkHlv1H14NybhW7' \ --data '{ "connector_type": "payment_processor", "connector_name": "archipel", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "///PEM CERITIFICATE///", }, "metadata": { "tenant_id": "///Tenant ID///", "platform_url": "///Platform URL///", "apple_pay_combined": { "manual": { "session_token_data": { "initiative": "web", "certificate": "", "display_name": "Flowbird", "certificate_keys": "", "initiative_context": "", "merchant_identifier": "", "merchant_business_country": "", "payment_processing_details_at": "Hyperswitch", "payment_processing_certificate": "", "payment_processing_certificate_key": "" }, "payment_request_data": { "label": "Flowbird", "supported_networks": [ "visa", "masterCard", "amex", "discover" ], "merchant_capabilities": [ "supports3DS" ] } } } }, "profile_id": "pro_eIirKlZvlDj8sE0O1x6s", "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "AmericanExpress", "Discover", "Interac", "JCB", "Mastercard", "Visa", "DinersClub", "UnionPay", "RuPay" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "AmericanExpress", "Discover", "Interac", "JCB", "Mastercard", "Visa", "DinersClub", "UnionPay", "RuPay" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "apple_pay", "payment_experience": null, "card_networks": [ "AmericanExpress", "Discover", "Interac", "JCB", "Mastercard", "Visa", "DinersClub", "UnionPay", "RuPay" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": false, "installment_payment_enabled": true } ] } ] }'
2. Make /payments call
curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_9BVJpIiKysTwOVEDlenKkv7JRiJed0NlzE6DSD2PPC0GwNgbQYkHlv1H14NybhW7' \ --data-raw '{ "amount": 500, "amount_to_capture": 500, "currency": "EUR", "confirm": true, "capture_method": "automatic", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_cvc": "123", "card_exp_month": "01", "card_exp_year": "50", "card_holder_name": "John Doe", "card_number": "5185570141917102" } }, "profile_id": "pro_eIirKlZvlDj8sE0O1x6s", "email": "[email protected]", "name": "John Doe", "phone": "8056594427", "phone_country_code": "+91", "description": "Illo dolore aliquid qui id eum voluptatem voluptatem ratione molestiae.", "billing": { "address": { "line1": "2 ter", "line2": "rue du château", "line3": "", "city": "Neuilly-sur-Seine", "state": "France", "zip": "92200", "country": "FR" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "Joseph Doe", "statement_descriptor_suffix": "JS" }'
Checklist
cargo +nightly fmt --all
cargo clippy