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

feat: added upi collect payment method type #491

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

ArushKapoorJuspay
Copy link
Contributor

@ArushKapoorJuspay ArushKapoorJuspay commented Jul 10, 2024

Type of Change

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

Description

Added upi collect payment method type

Screenshot 2024-07-10 at 4 00 03 PM Screenshot 2024-07-10 at 4 04 42 PM

How did you test it?

Payment Method List Response -

{
    "redirect_url": "https://google.com/success",
    "currency": "INR",
    "payment_methods": [
        {
            "payment_method": "upi",
            "payment_method_types": [
                {
                    "payment_method_type": "upi_collect",
                    "payment_experience": [
                        {
                            "payment_experience_type": "redirect_to_url",
                            "eligible_connectors": [
                                "razorpay"
                            ]
                        }
                    ],
                    "card_networks": null,
                    "bank_names": null,
                    "bank_debits": null,
                    "bank_transfers": null,
                    "required_fields": {
                        "payment_method_data.upi.upi_collect.vpa_id": {
                            "required_field": "payment_method_data.upi.upi_collect.vpa_id",
                            "display_name": "vpa_id",
                            "field_type": "user_vpa_id",
                            "value": null
                        }
                    },
                    "surcharge_details": null,
                    "pm_auth_connector": null
                }
            ]
        }
    ],
    "mandate_payment": null,
    "merchant_name": "NewAge Retailer",
    "show_surcharge_breakup_screen": false,
    "payment_type": "normal",
    "request_external_three_ds_authentication": false,
    "collect_shipping_details_from_wallets": false,
    "collect_billing_details_from_wallets": false
}

Confirm Payload -

{
  "amount": 5000,
  "currency": "INR",
  "confirm": true,
  "capture_method": "automatic",
  "capture_on": "2022-09-10T10:11:12Z",
  "amount_to_capture": 5000,
  "customer_id": "IatapayCustomer",
  "email": "guest@example.com",
  "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": "upi",
  "payment_method_type": "upi_collect",
  "payment_method_data": {
    "upi": {
      "upi_collect": {
      "vpa_id": "9490419802@ybl"
      }
    }
  },
  "billing": {
    "address": {
      "line1": "1467",
      "line2": "Harrison Street",
      "line3": "Harrison Street",
      "city": "San Fransico",
      "state": "California",
      "zip": "94122",
      "country": "IN",
      "first_name": "joseph",
      "last_name": "Doe"
    },
    "phone": {
      "number": "8056594427",
      "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": "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"
  }
}

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

@PritishBudhiraja PritishBudhiraja added the Ready for Review PR with label Ready for Review should only be reviewed. label Jul 10, 2024
@PritishBudhiraja PritishBudhiraja merged commit 8b87fc4 into main Jul 10, 2024
3 checks passed
@PritishBudhiraja PritishBudhiraja deleted the feat/upi-collect branch July 10, 2024 12:14
@github-actions github-actions bot added the Closed Label will be automatically added when the PR will get merged to main label Jul 10, 2024
akash-c-k pushed a commit that referenced this pull request Jul 10, 2024
# [0.74.0](v0.73.2...v0.74.0) (2024-07-10)

### Features

* added upi collect payment method type ([#491](#491)) ([8b87fc4](8b87fc4))
@PritishBudhiraja PritishBudhiraja removed the Ready for Review PR with label Ready for Review should only be reviewed. label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Label will be automatically added when the PR will get merged to main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants