Skip to content

fix(connector): removed forked josekit dependency from payout connector Nomupay#8183

Merged
likhinbopanna merged 5 commits intomainfrom
josekit_dependency_update
Jun 10, 2025
Merged

fix(connector): removed forked josekit dependency from payout connector Nomupay#8183
likhinbopanna merged 5 commits intomainfrom
josekit_dependency_update

Conversation

@sumanmaji4
Copy link
Contributor

@sumanmaji4 sumanmaji4 commented May 30, 2025

Type of Change

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

Description

Instead of using a forked repo to support empty payloads in josekit's JWT implementation, switch to using the josekit JWS directly, which supports empty payloads.

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?

Payouts Create Request

curl --location 'http://localhost:8080/payouts/create' \
--header 'x-feature: integ-custom' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_********hayH' \
--data-raw '{
    "amount": 11,
    "currency": "EUR",
    
    "email": "payout_c*****ample.com",
    
    "name": "John Doe",
    "phone": "99*****9",
    "phone_country_code": "+65",
    "description": "Its my first payout request",
    "payout_type": "bank",
    "payout_method_data": {
        "bank": {
            "iban": "D***9",
            "bic": "DEU****1",
            "bank_name": "******k",
            "bank_country_code": "NL",
            "bank_city": "A******"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "CA",
            "zip": "94122",
            "country": "DE",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "payout_cust*****2@example.com"
        
    },
    "entity_type": "Individual",
    "recurring": true,
    "metadata": {
        "ref": "123"
    },
    "connector": [
        "nomupay"
    ],
    "profile_id": "pro_Mh******Nqp",
    "confirm": true,
    "auto_fulfill": true
}'

Payouts Create Response

{
    "payout_id": "d7e******93",
    "merchant_id": "merchant_17******",
    "amount": 11,
    "currency": "EUR",
    "connector": "nomupay",
    "payout_type": "bank",
    "payout_method_data": {
        "bank": {
            "iban": "DE573************39",
            "bank_name": "******ank",
            "bank_country_code": "NL",
            "bank_city": "Am******",
            "bic": "DEU*****551"
        }
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "DE",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "CA",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        },
        "email": "payout_*****2@example.com"
    },
    "auto_fulfill": true,
    "customer_id": "cus_zwWD******K",
    "customer": {
        "id": "cus_zwWDxIF******WK",
        "name": "John Doe",
        "email": "payout_******@example.com",
        "phone": "99******9",
        "phone_country_code": "+65"
    },
    "client_secret": "payout_d7e35482-******-d43f0bbbd193_******X24LXbh",
    "return_url": null,
    "business_country": null,
    "business_label": null,
    "description": "Its my first payout request",
    "entity_type": "Individual",
    "recurring": true,
    "metadata": {
        "ref": "123"
    },
    "merchant_connector_id": "mca_OTsg******Rrn",
    "status": "pending",
    "error_message": null,
    "error_code": null,
    "profile_id": "pro_Mh******GNqp",
    "created": "2025-05-30T08:12:51.997Z",
    "connector_transaction_id": "PMT-0683******8112",
    "priority": null,
    "payout_link": null,
    "email": "payout_customer@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "unified_code": null,
    "unified_message": null,
    "payout_method_id": "pm_vvSrJ******1ljs"
}

Payout Retrieve Request

curl --location 'http://localhost:8080/payouts/d7e35482*********193?force_sync=true' \
--header 'api-key: dev_Gk8*******hayH'

Payout Retrieve Response

{
    "payout_id": "d7e35482********bbbd193",
    "merchant_id": "merc********6",
    "amount": 11,
    "currency": "EUR",
    "connector": "nomupay",
    "payout_type": "bank",
    "payout_method_data": {
        "bank": {
            "iban": "DE573************42639",
            "bank_name": "********ank",
            "bank_country_code": "NL",
            "bank_city": "A********",
            "bic": "DEU*****551"
        }
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "DE",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "CA",
            "first_name": "John",
            "last_name": "Doe"
        },
        "phone": {
            "number": "80********427",
            "country_code": "+91"
        },
        "email": "payout_cust********72@example.com"
    },
    "auto_fulfill": true,
    "customer_id": "cus_zw********prWK",
    "customer": {
        "id": "cus_z********rWK",
        "name": "John Doe",
        "email": "payou********er@example.com",
        "phone": "999********9",
        "phone_country_code": "+65"
    },
    "client_secret": "payout_d7e35482********bbbd193_secret_9Ut2Y3********LXbh",
    "return_url": null,
    "business_country": null,
    "business_label": null,
    "description": "Its my first payout request",
    "entity_type": "Individual",
    "recurring": true,
    "metadata": {
        "ref": "123"
    },
    "merchant_connector_id": "mca_******Rrn",
    "status": "pending",
    "error_message": null,
    "error_code": null,
    "profile_id": "pro_M********Nqp",
    "created": "2025-05-30T08:12:51.997Z",
    "connector_transaction_id": "PMT-068********b8112",
    "priority": null,
    "payout_link": null,
    "email": "payout_customer@example.com",
    "name": "John Doe",
    "phone": "99********9",
    "phone_country_code": "+65",
    "unified_code": null,
    "unified_message": null,
    "payout_method_id": "pm_vv********Qb1ljs"
}

[Payout] [Bank transfer] [SEPA] Fulfill using Token fails because it called after a successful payout. Nomupay needs a transfer_method_id along with connector_customer_id for subsequent payouts.

Screenshot 2025-05-27 at 11 43 08 AM

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

@sumanmaji4 sumanmaji4 requested review from a team as code owners May 30, 2025 08:06
@semanticdiff-com
Copy link

semanticdiff-com bot commented May 30, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  crates/hyperswitch_connectors/src/connectors/nomupay.rs  69% smaller
  Cargo.lock Unsupported file format
  crates/hyperswitch_connectors/Cargo.toml Unsupported file format

@sumanmaji4 sumanmaji4 changed the title [Fix] : Removed forked josekit dependency from hyperswitch connectors [Fix] : Removed forked josekit dependency from payout connector Nomupay May 30, 2025
.change_context(errors::ConnectorError::ProcessingStepFailed(None))?,
};

router_env::logger::info!(nomupay_jwt=?nomupay_jwt);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not log this

Copy link
Contributor

@kashif-m kashif-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the logs

@sumanmaji4 sumanmaji4 changed the title [Fix] : Removed forked josekit dependency from payout connector Nomupay fix(connector): removed forked josekit dependency from payout connector Nomupay May 30, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Jun 10, 2025
Merged via the queue into main with commit b1628f7 Jun 10, 2025
15 of 20 checks passed
@likhinbopanna likhinbopanna deleted the josekit_dependency_update branch June 10, 2025 07:09
pixincreate added a commit that referenced this pull request Jun 10, 2025
…ordea-sepa

* 'main' of github.com:juspay/hyperswitch: (63 commits)
  feat(connector): [TRUSTPAY] Added Integrity Checks for PSync & RSync flows & Added New Variants in AttemptStatus & IntentStatus (#8096)
  fix(connector): [STRIPE] Throwing Missing Required Field Error if connector_customer is not present (#8309)
  refactor(connectors): [worldpayvantiv] replace sandbox url with pre-live url and fix typo (#8286)
  fix: payment link styling for dynamic classes (#8273)
  feat(core): Make installment_payment_enabled,recurring_enabled Optional (#8201)
  fix(cypress): fix itaubank, datatrans and facilitapay (#8229)
  fix(connector): [jpmorgan] 5xx during payment authorize and `cancellation_reason` (#8282)
  revert(connector): [Worldpay] add root CA certificate (#8224)
  ci(cypress): fix fiuu, fiservemea , paybox and worldpay connector (#8209)
  fix(connector): removed forked josekit dependency from payout connector Nomupay (#8183)
  chore(version): 2025.06.10.0
  feat(tokenio): Add OpenBanking Redirection Flow (#8152)
  fix: Unified scarf setup (#8238)
  feat(health): Health check for Decision engine (#8243)
  chore: Update apple pay currency filter configs (#8217)
  refactor(customers_v2): Remove merchant reference id from v2 customer update (#7879)
  chore(version): 2025.06.09.0
  chore(postman): update Postman collection files
  ci(postman): add tunnel collection to postman tests (#8269)
  feat(connector): Added recurring payments support for split payments in Stripe (#8271)
  ...
pixincreate added a commit that referenced this pull request Jun 10, 2025
…ordea-sepa

* 'main' of github.com:juspay/hyperswitch: (63 commits)
  feat(connector): [TRUSTPAY] Added Integrity Checks for PSync & RSync flows & Added New Variants in AttemptStatus & IntentStatus (#8096)
  fix(connector): [STRIPE] Throwing Missing Required Field Error if connector_customer is not present (#8309)
  refactor(connectors): [worldpayvantiv] replace sandbox url with pre-live url and fix typo (#8286)
  fix: payment link styling for dynamic classes (#8273)
  feat(core): Make installment_payment_enabled,recurring_enabled Optional (#8201)
  fix(cypress): fix itaubank, datatrans and facilitapay (#8229)
  fix(connector): [jpmorgan] 5xx during payment authorize and `cancellation_reason` (#8282)
  revert(connector): [Worldpay] add root CA certificate (#8224)
  ci(cypress): fix fiuu, fiservemea , paybox and worldpay connector (#8209)
  fix(connector): removed forked josekit dependency from payout connector Nomupay (#8183)
  chore(version): 2025.06.10.0
  feat(tokenio): Add OpenBanking Redirection Flow (#8152)
  fix: Unified scarf setup (#8238)
  feat(health): Health check for Decision engine (#8243)
  chore: Update apple pay currency filter configs (#8217)
  refactor(customers_v2): Remove merchant reference id from v2 customer update (#7879)
  chore(version): 2025.06.09.0
  chore(postman): update Postman collection files
  ci(postman): add tunnel collection to postman tests (#8269)
  feat(connector): Added recurring payments support for split payments in Stripe (#8271)
  ...
pixincreate added a commit that referenced this pull request Jun 10, 2025
… into trustpay-banktransfer

* 'trustpay-banktransfer' of github.com:juspay/hyperswitch:
  feat(connector): [TRUSTPAY] Added Integrity Checks for PSync & RSync flows & Added New Variants in AttemptStatus & IntentStatus (#8096)
  fix(connector): [STRIPE] Throwing Missing Required Field Error if connector_customer is not present (#8309)
  refactor(connectors): [worldpayvantiv] replace sandbox url with pre-live url and fix typo (#8286)
  fix: payment link styling for dynamic classes (#8273)
  feat(core): Make installment_payment_enabled,recurring_enabled Optional (#8201)
  fix(cypress): fix itaubank, datatrans and facilitapay (#8229)
  fix(connector): [jpmorgan] 5xx during payment authorize and `cancellation_reason` (#8282)
  revert(connector): [Worldpay] add root CA certificate (#8224)
  ci(cypress): fix fiuu, fiservemea , paybox and worldpay connector (#8209)
  fix(connector): removed forked josekit dependency from payout connector Nomupay (#8183)
  chore(version): 2025.06.10.0
bsayak03 pushed a commit that referenced this pull request Jun 11, 2025
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