Skip to content

Conversation

awasthi21
Copy link
Contributor

@awasthi21 awasthi21 commented Sep 9, 2024

Type of Change

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

Description

Added DuitNowQR
Added FPX Payment Method

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?

Request

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:' \
--data '{
    "amount": 1222,
    "currency": "MYR",
    "confirm": true,
    "capture_method": "manual",
    "return_url": "https://google.com",
    "authentication_type": "no_three_ds",
    "payment_method": "real_time_payment",
    "payment_method_type": "duit_now",
    "payment_method_data": {
        "real_time_payment": {
            "duit_now":{
            }
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS"
}'

Response

{
    "payment_id": "pay_9l079slQTfxcnWXcvVWv",
    "merchant_id": "postman_merchant_GHAction_ff03d9c9-f319-4cf4-b657-f45aefd4cf5b",
    "status": "requires_customer_action",
    "amount": 1222,
    "net_amount": 1222,
    "amount_capturable": 1222,
    "amount_received": null,
    "connector": "fiuu",
    "client_secret": "pay_9l079slQTfxcnWXcvVWv_secret_eLSU6KF41kqq8PFWzEDZ",
    "created": "2024-09-09T11:59:34.213Z",
    "currency": "MYR",
    "customer_id": null,
    "customer": null,
    "description": null,
    "refunds": null,
    "disputes": null,
    "mandate_id": null,
    "mandate_data": null,
    "setup_future_usage": null,
    "off_session": null,
    "capture_on": null,
    "capture_method": "manual",
    "payment_method": "real_time_payment",
    "payment_method_data": {
        "real_time_payment": {},
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": "https://google.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "next_action": {
        "type": "qr_code_information",
        "image_data_url": "data:image/png;base64",
        "display_to_timestamp": null,
        "qr_code_url": null
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "duit_now",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": null,
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_glzU2Ijq0fPKjPpGv4VV",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_hqcC5QIpdCOQMXIKCzum",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-09-09T12:14:34.213Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-09-09T11:59:35.101Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}

image

**FPX **
Request

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_P5gdeka6FUxRQ04KOCTziGwl3d7RmGAhi6SIYqSyf8AOcvoAG9yVbdnH5I14b8H7' \
--data '{
  "amount": 1000,
  "currency": "MYR",
  "amount_to_capture":1000,
  "confirm": true,
  "capture_method": "automatic",
  "payment_method": "bank_redirect",
    "payment_method_type": "online_banking_fpx",
    "payment_method_data": {
      "bank_redirect": {
        "online_banking_fpx": {
          "issuer": "bank_islam"
        }
      }
    }
}'

Response

{
    "payment_id": "pay_NHJitFfMFucT4YlvLPql",
    "merchant_id": "postman_merchant_GHAction_ef7eaa6b-1a6d-47e0-8922-48ef5fd2058d",
    "status": "requires_customer_action",
    "amount": 1000,
    "net_amount": 1000,
    "amount_capturable": 1000,
    "amount_received": null,
    "connector": "fiuu",
    "client_secret": "pay_NHJitFfMFucT4YlvLPql_secret_S26ts7Aptec4Phq9ng4y",
    "created": "2024-09-10T12:49:44.741Z",
    "currency": "MYR",
    "customer_id": null,
    "customer": null,
    "description": null,
    "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": "bank_redirect",
    "payment_method_data": {
        "bank_redirect": {},
        "billing": null
    },
    "payment_token": null,
    "shipping": null,
    "billing": null,
    "order_details": null,
    "email": null,
    "name": null,
    "phone": null,
    "return_url": null,
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": {
        "type": "redirect_to_url",
        "redirect_to_url": "http://localhost:8080/payments/redirect/pay_NHJitFfMFucT4YlvLPql/postman_merchant_GHAction_ef7eaa6b-1a6d-47e0-8922-48ef5fd2058d/pay_NHJitFfMFucT4YlvLPql_1"
    },
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "online_banking_fpx",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": null,
    "manual_retry_allowed": null,
    "connector_transaction_id": "30873605",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": null,
    "payment_link": null,
    "profile_id": "pro_sBgvmr7vRtnw4EVuvg72",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_K6qyBEGB0tOHdbppPILi",
    "incremental_authorization_allowed": null,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-09-10T13:04:44.741Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-09-10T12:49:45.358Z",
    "charges": null,
    "frm_metadata": null,
    "merchant_order_reference_id": null
}

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

@awasthi21 awasthi21 added the A-connector-integration Area: Connector integration label Sep 9, 2024
@awasthi21 awasthi21 self-assigned this Sep 9, 2024
@awasthi21 awasthi21 requested review from a team as code owners September 9, 2024 12:59
Copy link

semanticdiff-com bot commented Sep 9, 2024

Review changes with SemanticDiff.

Analyzed 12 of 22 files.

Overall, the semantic diff is 25% smaller than the GitHub diff.

File Information
Filename Status
Cargo.lock Unsupported file format
loadtest/config/development.toml Unsupported file format
crates/router/Cargo.toml Unsupported file format
✔️ crates/router/src/consts.rs Analyzed
✔️ crates/router/src/utils.rs Analyzed
✔️ crates/router/src/connector/nuvei/transformers.rs 24.56% smaller
✔️ crates/router/src/connector/multisafepay/transformers.rs 38.89% smaller
✔️ crates/router/src/connector/adyen/transformers.rs 28.0% smaller
✔️ crates/hyperswitch_interfaces/src/configs.rs Analyzed
crates/hyperswitch_connectors/Cargo.toml Unsupported file format
✔️ crates/hyperswitch_connectors/src/utils.rs Analyzed
✔️ crates/hyperswitch_connectors/src/connectors/fiuu.rs 70.91% smaller
✔️ crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs 25.13% smaller
✔️ crates/common_enums/src/enums.rs Analyzed
config/config.example.toml Unsupported file format
config/development.toml Unsupported file format
config/docker_compose.toml Unsupported file format
config/deployments/integration_test.toml Unsupported file format
config/deployments/production.toml Unsupported file format
config/deployments/sandbox.toml Unsupported file format
✔️ api-reference-v2/openapi_spec.json Analyzed
✔️ api-reference/openapi_spec.json Analyzed

@awasthi21 awasthi21 force-pushed the 6688-featconnector-fiuu-add-diutnowqr-for-fiuu branch from 43f054c to 60771b2 Compare September 10, 2024 04:57
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Sep 10, 2024
@awasthi21 awasthi21 changed the title Feat(connector): [Fiuu] Add DuitNow PaymentMethod Feat(connector): [Fiuu] Add DuitNow/FPX PaymentMethod Sep 11, 2024
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Sep 11, 2024
Merged via the queue into main with commit 8c0fec9 Sep 11, 2024
13 of 14 checks passed
@Gnanasundari24 Gnanasundari24 deleted the 6688-featconnector-fiuu-add-diutnowqr-for-fiuu branch September 11, 2024 11:31
pixincreate added a commit that referenced this pull request Sep 13, 2024
* 'main' of github.com:juspay/hyperswitch: (51 commits)
  feat(connector): [DEUTSCHEBANK] Integrate SEPA Payments (#5826)
  feat(payments_v2): payment intent diesel and domain models changes v2 (#5783)
  feat(connector): [Fiuu] ADD Wasm Configs (#5874)
  chore(version): 2024.09.13.0
  refactor(core): Update shipping_cost and order_tax_amount to net_amount of payment_attempt (#5844)
  refactor: return optional request body from build_request_v2 in ConnectorIntegrationV2 trait (#5865)
  feat(refunds): Refunds aggregate api (#5795)
  refactor: handle redirections for iframed content (#5591)
  refactor(payment_links): Update API contract for dynamic transaction details and upgrade UI (#5849)
  fix(router): add payment_method check in `get_mandate_type` (#5828)
  fix(connector): [ZSL] compare consr_paid_amt with the total amount for identifying partial payments (#5873)
  feat(connector): [Novalnet] add Payment flows for cards (#5726)
  chore(version): 2024.09.12.0
  fix(router): return `collect_billing_details_from_wallet_connector` if `always_collect_billing_details_from_wallet_connector ` is false in merchant payment method list (#5854)
  feat(opensearch): add profile_id and organization_id to /search APIs (#5705)
  build(deps): bump `sqlx` to `0.8.2` (#5859)
  refactor: Remove unwanted commented lines (#5851)
  feat(payments): add support for profile aggregates (#5845)
  Feat(connector): [Fiuu] Add DuitNow/FPX PaymentMethod (#5841)
  chore: remove Connectors enum dependency from ConnectorIntegrationV2 trait (#5840)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration M-api-contract-changes Metadata: This PR involves API contract changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants