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

[FEATURE] send metadata field in authentication request for nmi, noon and cryptopay #3514

Closed
2 tasks done
hrithikesh026 opened this issue Feb 1, 2024 · 1 comment · Fixed by #3325
Closed
2 tasks done
Assignees
Labels
C-feature Category: Feature request or enhancement

Comments

@hrithikesh026
Copy link
Contributor

Feature Description

Send metadata in the authorize request for noon, nmi and cryptopay.

Possible Implementation

metadata field is being sent in routerData.request for Authorize request. This needs to be mapped to connector request body.

Have you spent some time checking if this feature request has been raised before?

  • I checked and didn't find a similar issue

Have you read the Contributing Guidelines?

Are you willing to submit a PR?

Yes, I am willing to submit a PR!

@hrithikesh026 hrithikesh026 added C-feature Category: Feature request or enhancement S-awaiting-triage Status: New issues that have not been assessed yet labels Feb 1, 2024
@hrithikesh026 hrithikesh026 self-assigned this Feb 1, 2024
@hrithikesh026
Copy link
Contributor Author

hrithikesh026 commented Feb 6, 2024

Steps to test.:

  1. create a payment by passing some metadata.
    payment create for NMI.
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_uanOuwhWfsgaB86xH9qDuneLJP00dRlok5Wljq0RqWnu2WSW9Rq39ENWjBPcO1d0' \
--data-raw '{
    "amount": 15030,
    "currency": "USD",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 15030,
    "customer_id": "StripeCustomer",
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    "payment_method": "card",
    "payment_method_data": {
        "card": {
            "card_number": "4111111111111111",
            "card_exp_month": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'

Payment Create for Noon

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_Kut1olfFaQ8XGnXGIHc2yBGpcbQb7L2qSynnX4vR5VXCG6EtT4dgJOXj5JLH1LGt' \
--data-raw '{
    "amount": 6540,
    "currency": "AED",
    "confirm": true,
    "business_country": "US",
    "business_label": "default",
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "amount_to_capture": 6540,
    "customer_id": "bernard123",
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+65",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://duck.com",
    
    "payment_method": "card",
    "payment_method_type": "debit",
    "payment_method_data": {
        "card": {
            "card_number": "4000000000002719",
            "card_exp_month": "01",
            "card_exp_year": "28",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "AE",
            "first_name": "sundari",
            "last_name": "sundari"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "AE",
            "first_name": "sundari",
            "last_name": "sundari"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    },
    "routing": {
        "type": "single",
        "data": "stripe"
    },
    "connector_metadata": {
        "noon": {
            "order_category": "pay"
        }
    }
}'

Create payment for cryptopay

curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_n9kqY5uw7flNv1SWULjuudXm4uTnwz2sGWKgpjvfj6VvA0voETLTBqZ268ZKv2TS' \
--data-raw '{
    "amount": 60000,
    "currency": "INR",
    "confirm": true,
    "capture_method": "automatic",
    "capture_on": "2022-09-10T10:11:12Z",
    "customer_id": "StripeCustomer",
    "email": "[email protected]",
    "name": "John Doe",
    "phone": "999999999",
    "phone_country_code": "+1",
    "description": "Its my first payment request",
    "authentication_type": "no_three_ds",
    "return_url": "https://google.com",
    "payment_method": "crypto",
    "payment_method_type": "crypto_currency",
    "payment_method_data": {
        "crypto": {
            "pay_currency": "XLM"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "AF",
            "first_name": "joseph",
            "last_name": "Doe"
        },
        "phone": {
            "number": "8056594427",
            "country_code": "+91"
        }
    },
    "statement_descriptor_name": "joseph",
    "statement_descriptor_suffix": "JS",
    "metadata": {
        "udf1": "value1",
        "new_customer": "true",
        "login_date": "2019-09-10T10:11:12Z"
    }
}'
  1. Verifying if metadata is sent to the connector:

For NOON: The metadata field should be visible in connector dashboard
For NMI: Download the transaction as csv or xls file to see the metadata .
For Cryptopay: metadata should be returned in the connector payment response during force sync.

@pixincreate pixincreate removed the S-awaiting-triage Status: New issues that have not been assessed yet label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: Feature request or enhancement
Projects
None yet
2 participants