Skip to content

Commit ee7bce0

Browse files
swangi-kumariAishwariyaa AnandAishwariyaa-Anandhyperswitch-bot[bot]
authored
feat(connector): Implement Razorpay UPI Collect (#8009)
Co-authored-by: Aishwariyaa Anand <[email protected]> Co-authored-by: Aishwariyaa Anand <[email protected]> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
1 parent 0fb7eb0 commit ee7bce0

File tree

50 files changed

+1402
-1466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1402
-1466
lines changed

api-reference-v2/openapi_spec.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14417,6 +14417,14 @@
1441714417
"type": "integer",
1441814418
"nullable": true
1441914419
},
14420+
"poll_config": {
14421+
"allOf": [
14422+
{
14423+
"$ref": "#/components/schemas/PollConfig"
14424+
}
14425+
],
14426+
"nullable": true
14427+
},
1442014428
"type": {
1442114429
"type": "string",
1442214430
"enum": [
@@ -20620,6 +20628,27 @@
2062020628
}
2062120629
}
2062220630
},
20631+
"PollConfig": {
20632+
"type": "object",
20633+
"required": [
20634+
"delay_in_secs",
20635+
"frequency"
20636+
],
20637+
"properties": {
20638+
"delay_in_secs": {
20639+
"type": "integer",
20640+
"format": "int32",
20641+
"description": "Interval of the poll",
20642+
"minimum": 0
20643+
},
20644+
"frequency": {
20645+
"type": "integer",
20646+
"format": "int32",
20647+
"description": "Frequency of the poll",
20648+
"minimum": 0
20649+
}
20650+
}
20651+
},
2062320652
"PollConfigResponse": {
2062420653
"type": "object",
2062520654
"required": [

api-reference/openapi_spec.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17394,6 +17394,14 @@
1739417394
"type": "integer",
1739517395
"nullable": true
1739617396
},
17397+
"poll_config": {
17398+
"allOf": [
17399+
{
17400+
"$ref": "#/components/schemas/PollConfig"
17401+
}
17402+
],
17403+
"nullable": true
17404+
},
1739717405
"type": {
1739817406
"type": "string",
1739917407
"enum": [
@@ -25301,6 +25309,27 @@
2530125309
}
2530225310
}
2530325311
},
25312+
"PollConfig": {
25313+
"type": "object",
25314+
"required": [
25315+
"delay_in_secs",
25316+
"frequency"
25317+
],
25318+
"properties": {
25319+
"delay_in_secs": {
25320+
"type": "integer",
25321+
"format": "int32",
25322+
"description": "Interval of the poll",
25323+
"minimum": 0
25324+
},
25325+
"frequency": {
25326+
"type": "integer",
25327+
"format": "int32",
25328+
"description": "Frequency of the poll",
25329+
"minimum": 0
25330+
}
25331+
}
25332+
},
2530425333
"PollConfigResponse": {
2530525334
"type": "object",
2530625335
"required": [

config/config.example.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ plaid.base_url = "https://sandbox.plaid.com"
270270
powertranz.base_url = "https://staging.ptranz.com/api/"
271271
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
272272
rapyd.base_url = "https://sandboxapi.rapyd.net"
273-
razorpay.base_url = "https://sandbox.juspay.in/"
273+
razorpay.base_url = "https://api.razorpay.com/"
274274
recurly.base_url = "https://v3.recurly.com"
275275
redsys.base_url = "https://sis-t.redsys.es:25443"
276276
riskified.base_url = "https://sandbox.riskified.com/api"

config/deployments/integration_test.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ plaid.base_url = "https://sandbox.plaid.com"
107107
powertranz.base_url = "https://staging.ptranz.com/api/"
108108
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
109109
rapyd.base_url = "https://sandboxapi.rapyd.net"
110-
razorpay.base_url = "https://sandbox.juspay.in/"
110+
razorpay.base_url = "https://api.razorpay.com/"
111111
recurly.base_url = "https://v3.recurly.com"
112112
redsys.base_url = "https://sis-t.redsys.es:25443"
113113
shift4.base_url = "https://api.shift4.com/"

config/deployments/production.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ plaid.base_url = "https://production.plaid.com"
111111
powertranz.base_url = "https://staging.ptranz.com/api/"
112112
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
113113
rapyd.base_url = "https://api.rapyd.net"
114-
razorpay.base_url = "https://api.juspay.in"
114+
razorpay.base_url = "https://api.razorpay.com/"
115115
recurly.base_url = "https://v3.recurly.com"
116116
redsys.base_url = "https://sis.redsys.es"
117117
riskified.base_url = "https://wh.riskified.com/api/"

config/deployments/sandbox.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ plaid.base_url = "https://sandbox.plaid.com"
111111
powertranz.base_url = "https://staging.ptranz.com/api/"
112112
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
113113
rapyd.base_url = "https://sandboxapi.rapyd.net"
114-
razorpay.base_url = "https://sandbox.juspay.in/"
114+
razorpay.base_url = "https://api.razorpay.com/"
115115
recurly.base_url = "https://v3.recurly.com"
116116
redsys.base_url = "https://sis-t.redsys.es:25443"
117117
riskified.base_url = "https://sandbox.riskified.com/api"

config/development.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ plaid.base_url = "https://sandbox.plaid.com"
302302
powertranz.base_url = "https://staging.ptranz.com/api/"
303303
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
304304
rapyd.base_url = "https://sandboxapi.rapyd.net"
305-
razorpay.base_url = "https://sandbox.juspay.in/"
305+
razorpay.base_url = "https://api.razorpay.com/"
306306
recurly.base_url = "https://v3.recurly.com"
307307
redsys.base_url = "https://sis-t.redsys.es:25443"
308308
riskified.base_url = "https://sandbox.riskified.com/api"

config/docker_compose.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ plaid.base_url = "https://sandbox.plaid.com"
196196
powertranz.base_url = "https://staging.ptranz.com/api/"
197197
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
198198
rapyd.base_url = "https://sandboxapi.rapyd.net"
199-
razorpay.base_url = "https://sandbox.juspay.in/"
199+
razorpay.base_url = "https://api.razorpay.com/"
200200
recurly.base_url = "https://v3.recurly.com"
201201
redsys.base_url = "https://sis-t.redsys.es:25443"
202202
riskified.base_url = "https://sandbox.riskified.com/api"

config/payment_required_fields_v2.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2090,7 +2090,10 @@ non_mandate = [
20902090
# Payment method type: UpiCollect
20912091
[required_fields.upi.upi_collect.fields.Razorpay]
20922092
common = [
2093-
{ required_field = "payment_method_data.upi.vpa_id", display_name = "vpa_id", field_type = "text" }
2093+
{ required_field = "payment_method_data.upi.vpa_id", display_name = "vpa_id", field_type = "text" },
2094+
{ required_field = "payment_method_data.billing.email", display_name = "email", field_type = "user_email_address" },
2095+
{ required_field = "payment_method_data.billing.phone.number", display_name = "phone", field_type = "user_phone_number" },
2096+
{ required_field = "payment_method_data.billing.phone.country_code", display_name = "dialing_code", field_type = "user_phone_number_country_code" }
20942097
]
20952098
mandate = []
20962099
non_mandate = []

crates/api_models/src/payments.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4537,6 +4537,7 @@ pub enum NextActionData {
45374537
WaitScreenInformation {
45384538
display_from_timestamp: i128,
45394539
display_to_timestamp: Option<i128>,
4540+
poll_config: Option<PollConfig>,
45404541
},
45414542
/// Contains the information regarding three_ds_method_data submission, three_ds authentication, and authorization flows
45424543
ThreeDsInvoke {
@@ -4697,6 +4698,15 @@ pub struct QrCodeNextStepsInstruction {
46974698
pub struct WaitScreenInstructions {
46984699
pub display_from_timestamp: i128,
46994700
pub display_to_timestamp: Option<i128>,
4701+
pub poll_config: Option<PollConfig>,
4702+
}
4703+
4704+
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
4705+
pub struct PollConfig {
4706+
/// Interval of the poll
4707+
pub delay_in_secs: u16,
4708+
/// Frequency of the poll
4709+
pub frequency: u16,
47004710
}
47014711

47024712
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]

0 commit comments

Comments
 (0)