Skip to content

feat(connector): [Fiuu] Consume transaction id for error cases for Fiuu#6998

Merged
Gnanasundari24 merged 2 commits intomainfrom
fiuuConsumeTxnId
Jan 7, 2025
Merged

feat(connector): [Fiuu] Consume transaction id for error cases for Fiuu#6998
Gnanasundari24 merged 2 commits intomainfrom
fiuuConsumeTxnId

Conversation

@dgeee13
Copy link
Contributor

@dgeee13 dgeee13 commented Jan 6, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

To consume transaction id for some error cases , where currently its not consumed. This PR addresses this issue.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Tested manually by hitting payments retrieve

After

cURL

curl --location --request GET 'http://localhost:8080/payments/pay_9EIH03YnsLSJAqfoYkxU' \
--header 'Accept: application/json' \
--header 'api-key: dev_laI3IG0iKD2bmhZIwT5b0kq1VrWDKoCZ3eJqkWbWeHGEEUpzSy7rg2ZjjlV7JRhy'

Response

{ "payment_id": "pay_9EIH03YnsLSJAqfoYkxU", "merchant_id": "merchant_1736151941", "status": "failed", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "fiuu", "client_secret": "pay_9EIH03YnsLSJAqfoYkxU_secret_CXYmUD5F0wg8tQbExwjE", "created": "2025-01-06T10:45:23.087Z", "currency": "MYR", "customer_id": "exampel3rewfdsvc2", "customer": { "id": "exampel3rewfdsvc2", "name": null, "email": null, "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "5100", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "510510", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "Max Mustermann", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": "", "error_message": "", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": true, "connector_transaction_id": "30926945", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_ne27DW6cFOwPOUdMLTLY", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_tfcWJii5BjqSKlxoqbdJ", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-06T11:00:23.086Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "103.77.139.95", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-06T10:45:29.931Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null }
Screenshot 2025-01-06 at 16 34 39
(connector_transaction_id present in response)

Before

Screenshot 2025-01-06 at 16 27 42 Screenshot 2025-01-06 at 16 47 22

(connector_transaction_id not present in response)

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@dgeee13 dgeee13 self-assigned this Jan 6, 2025
@dgeee13 dgeee13 requested a review from a team as a code owner January 6, 2025 11:18
@semanticdiff-com
Copy link

semanticdiff-com bot commented Jan 6, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs  53% smaller

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Jan 7, 2025
Merged via the queue into main with commit 6b1e5b0 Jan 7, 2025
@Gnanasundari24 Gnanasundari24 deleted the fiuuConsumeTxnId branch January 7, 2025 08:04
pixincreate added a commit to Ankesh2004/hyperswitch that referenced this pull request Jan 9, 2025
…r-verifyurl-in-redirection-handler

* 'main' of github.com:juspay/hyperswitch: (30 commits)
  test(cypress): add test for In Memory Cache (juspay#6961)
  chore(version): 2025.01.09.1
  fix(dummyconnector): add tenant id in dummyconnector requests (juspay#7008)
  chore(version): 2025.01.09.0
  fix(cypress): backup and restore sessions when using user apis (juspay#6978)
  feat(users): handle edge features for users in tenancy (juspay#6990)
  chore(dynamic-fields): [Worldpay] update dynamic fields for payments (juspay#7002)
  chore(version): 2025.01.08.0
  fix: consider status of payment method before filtering wallets in list pm (juspay#7004)
  feat(core): add columns unified error code and error message in refund table (juspay#6933)
  feat(connector): [Fiuu] Consume transaction id for error cases for Fiuu (juspay#6998)
  docs(cypress): update cypress documentation (juspay#6956)
  chore(version): 2025.01.07.0
  chore(keymanager): add tenant-id to keymanager requests (juspay#6968)
  ci(cypress): Add Session Token Testcases (juspay#6683)
  Ci(Cypress): Add PML test and Dynamic Fields Test for Novalnet (juspay#6544)
  chore(version): 2025.01.06.0
  ci(cypress): fix adyen sofort in cypress (juspay#6984)
  chore: add migrations for Currency type in DB (juspay#6980)
  chore(version): 2025.01.03.0
  ...
pixincreate added a commit that referenced this pull request Jan 9, 2025
…d-memory-cache

* 'main' of github.com:juspay/hyperswitch:
  test(cypress): add test for In Memory Cache (#6961)
  chore(version): 2025.01.09.1
  fix(dummyconnector): add tenant id in dummyconnector requests (#7008)
  chore(version): 2025.01.09.0
  fix(cypress): backup and restore sessions when using user apis (#6978)
  feat(users): handle edge features for users in tenancy (#6990)
  chore(dynamic-fields): [Worldpay] update dynamic fields for payments (#7002)
  chore(version): 2025.01.08.0
  fix: consider status of payment method before filtering wallets in list pm (#7004)
  feat(core): add columns unified error code and error message in refund table (#6933)
  feat(connector): [Fiuu] Consume transaction id for error cases for Fiuu (#6998)
  docs(cypress): update cypress documentation (#6956)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants