Skip to content

Feat(connector): [WELLSFARGO] Implement Payment Flows#5463

Merged
likhinbopanna merged 5 commits intomainfrom
5445-featconnector-wellsfargo-implement-wellsfargo-payins
Aug 6, 2024
Merged

Feat(connector): [WELLSFARGO] Implement Payment Flows#5463
likhinbopanna merged 5 commits intomainfrom
5445-featconnector-wellsfargo-implement-wellsfargo-payins

Conversation

@awasthi21
Copy link
Contributor

@awasthi21 awasthi21 commented Jul 29, 2024

Type of Change

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

Description

Added Basic Payment flows for WellsFargo

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?

Added Cypress Test
Some Tests are failing because of the 3ds request being routed to non_three_ds
Screenshot 2024-08-05 at 5 32 51 PM

For Ach Payments
Request:

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:' \
--data-raw '{
    "amount": 23243,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "customer_id": "wellsfargocustomer",
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "return_url": "https://duck.com",
    "payment_method": "bank_debit",
    "payment_method_type": "ach",
    "payment_method_data": {
        "bank_debit": {
            "ach_bank_debit": {
                "name": "test",
                "bank_type":"checking",
                "account_number": "12345678",
                "routing_number": "112200439"
            }
        }
    },
    "billing": {
        "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": "9123456789",
            "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": "9123456789",
            "country_code": "+91"
        }
    }
}'

Response

{
    "payment_id": "pay_3jcprBJLvoggYKVGG1W3",
    "merchant_id": "postman_merchant_GHAction_65b8958b-ff29-4426-bc3c-c30f6fbd1946",
    "status": "succeeded",
    "amount": 23243,
    "net_amount": 23243,
    "amount_capturable": 0,
    "amount_received": 23243,
    "connector": "wellsfargo",
    "client_secret": "pay_3jcprBJLvoggYKVGG1W3_secret_rkW3Qfo9Xz58AVzW0ZnQ",
    "created": "2024-07-30T07:53:11.640Z",
    "currency": "USD",
    "customer_id": "cybersourcecustomer",
    "customer": {
        "id": "cybersourcecustomer",
        "name": "John Doe",
        "email": "guest@example.com",
        "phone": "999999999",
        "phone_country_code": "+1"
    },
    "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_debit",
    "payment_method_data": {
        "bank_debit": {},
        "billing": null
    },
    "payment_token": null,
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": null
    },
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "9123456789",
            "country_code": "+91"
        },
        "email": null
    },
    "order_details": null,
    "email": "guest@example.com",
    "name": "John Doe",
    "phone": "999999999",
    "return_url": "https://duck.com/",
    "authentication_type": "no_three_ds",
    "statement_descriptor_name": null,
    "statement_descriptor_suffix": null,
    "next_action": null,
    "cancellation_reason": null,
    "error_code": null,
    "error_message": null,
    "unified_code": null,
    "unified_message": null,
    "payment_experience": null,
    "payment_method_type": "ach",
    "connector_label": null,
    "business_country": null,
    "business_label": "default",
    "business_sub_label": null,
    "allowed_payment_method_types": null,
    "ephemeral_key": {
        "customer_id": "wellsfargocustomer",
        "created_at": 1722325991,
        "expires": 1722329591,
        "secret": ""
    },
    "manual_retry_allowed": false,
    "connector_transaction_id": "7223259942386847504953",
    "frm_message": null,
    "metadata": null,
    "connector_metadata": null,
    "feature_metadata": null,
    "reference_id": "pay_3jcprBJLvoggYKVGG1W3_1",
    "payment_link": null,
    "profile_id": "pro_2GK94kpxN56WZfJHV81h",
    "surcharge_details": null,
    "attempt_count": 1,
    "merchant_decision": null,
    "merchant_connector_id": "mca_vuiyOtLRLHEf1I97QC6p",
    "incremental_authorization_allowed": false,
    "authorization_count": null,
    "incremental_authorizations": null,
    "external_authentication_details": null,
    "external_3ds_authentication_attempted": false,
    "expires_on": "2024-07-30T08:08:11.640Z",
    "fingerprint": null,
    "browser_info": null,
    "payment_method_id": null,
    "payment_method_status": null,
    "updated": "2024-07-30T07:53:15.334Z",
    "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 Jul 29, 2024
@awasthi21 awasthi21 self-assigned this Jul 29, 2024
@awasthi21 awasthi21 requested review from a team as code owners July 29, 2024 06:01
@awasthi21 awasthi21 linked an issue Jul 29, 2024 that may be closed by this pull request
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Jul 29, 2024
@awasthi21 awasthi21 changed the title 5445 featconnector wellsfargo implement wellsfargo payins 5445 feat(connector) Implement WellsFargo Payment Flows Jul 29, 2024
@awasthi21 awasthi21 changed the title 5445 feat(connector) Implement WellsFargo Payment Flows 5445 feat(connector):Implement WellsFargo Payment Flows Jul 29, 2024
@awasthi21 awasthi21 closed this Jul 29, 2024
@awasthi21 awasthi21 force-pushed the 5445-featconnector-wellsfargo-implement-wellsfargo-payins branch from 713a89d to 623cf4c Compare July 29, 2024 06:37
@hyperswitch-bot hyperswitch-bot bot removed the M-api-contract-changes Metadata: This PR involves API contract changes label Jul 29, 2024
@pixincreate pixincreate deleted the 5445-featconnector-wellsfargo-implement-wellsfargo-payins branch July 29, 2024 06:39
@awasthi21 awasthi21 reopened this Jul 29, 2024
@awasthi21 awasthi21 changed the title 5445 feat(connector):Implement WellsFargo Payment Flows feat(connector):Implement WellsFargo Payment Flows Jul 29, 2024
@hyperswitch-bot hyperswitch-bot bot added the M-api-contract-changes Metadata: This PR involves API contract changes label Jul 29, 2024
@awasthi21 awasthi21 force-pushed the 5445-featconnector-wellsfargo-implement-wellsfargo-payins branch from 250e1d2 to 5514fe5 Compare July 29, 2024 07:46
@pixincreate pixincreate changed the title feat(connector):Implement WellsFargo Payment Flows feat(connector): implement WellsFargo Payment Flows Jul 29, 2024
impl api::RefundExecute for Wellsfargo {}
impl api::RefundSync for Wellsfargo {}

#[allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not needed, Removed

}

impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData>
#[allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not needed, Removed

@pixincreate pixincreate added the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Aug 1, 2024
@awasthi21 awasthi21 changed the title feat(connector): implement WellsFargo Payment Flows Feat(connector): [WELLSFARGO] Implement Payment Flows Aug 5, 2024
@awasthi21 awasthi21 force-pushed the 5445-featconnector-wellsfargo-implement-wellsfargo-payins branch from 32f1bec to 0e3965c Compare August 5, 2024 10:26
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 6, 2024
Merged via the queue into main with commit a082759 Aug 6, 2024
@pixincreate pixincreate removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Aug 7, 2024
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.

7 participants