Skip to content
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

refactor(connector): Use connector_request_reference_id for PayU #2722

Closed
wants to merge 23 commits into from
Closed

refactor(connector): Use connector_request_reference_id for PayU #2722

wants to merge 23 commits into from

Conversation

vinfinity7
Copy link

@vinfinity7 vinfinity7 commented Oct 29, 2023

Type of Change

Fixes #2313

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

Description

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?

Make any Payment for connector PayU and see that you are getting "reference_id" field in the logs of payment request.

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
  • I added a CHANGELOG entry if applicable

@vinfinity7 vinfinity7 requested a review from a team as a code owner October 29, 2023 18:54
@github-actions github-actions bot added the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Oct 29, 2023
@vinfinity7 vinfinity7 changed the title [UPDATED] transformers.rs refactor(connector): Use connector_request_reference_id for PayU Oct 29, 2023
@github-actions github-actions bot removed the S-conventions-not-followed Status: This PR does not follow contributing guidelines label Oct 29, 2023
@swangi-kumari swangi-kumari added A-connector-integration Area: Connector integration C-refactor Category: Refactor hacktoberfest Issues that are up for grabs for Hacktoberfest participants labels Oct 31, 2023
@swangi-kumari
Copy link
Contributor

Hey @vinfinity7 ,
Please comment on the issue 2313, so that we can assign that issue to you.

@swangi-kumari
Copy link
Contributor

swangi-kumari commented Oct 31, 2023

Pls address the CI fails
Run cargo +nightly fmt for formatting.

@srujanchikke srujanchikke added the S-waiting-on-author Status: This PR is incomplete or needs to address review comments label Oct 31, 2023
@swangi-kumari
Copy link
Contributor

Hi @vinfinity7 ,
Thanks for your interest in contributing to hyperswitch.
Let us know if you need any assistance from our end.
Also, even if hacktoberfest is over, we should celebrate open source everyday and we are open for more contributions from you.
We would still be rewarding folks with goodies even if the PR gets merged post hacktoberfest.
May the Source be with you!

@vinfinity7
Copy link
Author

@swangi-kumari kindly review pr

@vinfinity7
Copy link
Author

@swangi-kumari if the pr's alright , you might wanna consider merging it 👍 or give me heads up as to what can i modify ?

Copy link
Contributor

@srujanchikke srujanchikke left a comment

Choose a reason for hiding this comment

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

Hey @vinfinity7 ,
Please make suggested changes.

Copy link
Author

@vinfinity7 vinfinity7 left a comment

Choose a reason for hiding this comment

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

So I've done the suggested changes @srujanchikke

@vinfinity7
Copy link
Author

@swangi-kumari as srujan has approved the changes , i would like to request your review too for a quick merge!

@vinfinity7
Copy link
Author

vinfinity7 commented Mar 24, 2024

@srujanchikke whats up with this ?

@srujanchikke
Copy link
Contributor

@Gnanasundari24 @likhinbopanna Could you please merge this PR ?

@vinfinity7
Copy link
Author

@Gnanasundari24 @likhinbopanna Could you please merge this PR ?

@srujanchikke
Copy link
Contributor

srujanchikke commented Apr 3, 2024

Make any Payment for connector PayU and see that you are getting "reference_id" field i

Hi @vinfinity7 , Can you add curl request and response json for testing and also screenshots.
CC : @likhinbopanna

@vinfinity7
Copy link
Author

hi @srujanchikke being new to this repo , i am not aware of the route to hit , please be clear of the curl request command

@srujanchikke
Copy link
Contributor

srujanchikke commented Apr 4, 2024

hi @srujanchikke being new to this repo , i am not aware of the route to hit , please be clear of the curl request command

You can provide /payments request & response jsons and screenshot of log where raw_connector_request (masked request) is logged.

Please don't expose any api keys in the json or curl .

@srujanchikke
Copy link
Contributor

srujanchikke commented Apr 4, 2024

hi @srujanchikke being new to this repo , i am not aware of the route to hit , please be clear of the curl request command

You can provide /payments request & response jsons and screenshot of log where raw_connector_request (masked request) is logged.

Please don't expose any api keys in the json or curl .

This would look something like this
reqeust json for making payment :

{
    "amount":1000,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 1000,
    "customer_id": "123sdfadf",
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "three_ds",
    "return_url": "https://google.com",
    "payment_method": "card",
    "payment_method_type": "credit",
    "payment_method_data": {
        "card": {
            "card_number": "374245455400126",
            "card_exp_month": "05",
            "card_exp_year": "26",
            "card_holder_name": "joseph",
            "card_cvc": "1234"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "CA",
            "line3": "CA",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "CA",
            "line3": "CA",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "browser_info": {
        "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",
        "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,\/;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "ip_address": "127.2.2.0",
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}

raw_connector_request :

Screenshot 2024-04-04 at 4 21 19 PM

You can also any other possible test cases if there.

@vinfinity7
Copy link
Author

vinfinity7 commented Apr 11, 2024

curl --location 'https://sandbox.hyperswitch.io/routing/business_profile/:business_profile_id/configs/pg_agnostic_mit' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer JWT_Token' \
--data '{
    "enabled": true
}' 

the request has to be somewhat like this but exactly what route i am a bit lost , @srujanchikke assistance

@vinfinity7 vinfinity7 closed this by deleting the head repository May 14, 2024
@SanchithHegde SanchithHegde removed the S-waiting-on-author Status: This PR is incomplete or needs to address review comments label May 19, 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 C-refactor Category: Refactor hacktoberfest Issues that are up for grabs for Hacktoberfest participants
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: [PayU] Use connector_request_reference_id as reference to the connector
5 participants