Skip to content
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8da90c0
feat: razorpay-upi
swangi-kumari May 12, 2025
f1117fe
feat: comment webhook code
swangi-kumari May 13, 2025
49c1723
refactor: fix
swangi-kumari May 13, 2025
a9b8785
refactor: remove println
swangi-kumari May 13, 2025
3fb7c21
refactor: remove unnecessary comments
swangi-kumari May 13, 2025
60a9a1b
refactor: required fields
swangi-kumari May 14, 2025
9ba5f8f
feat: add CreateOrder flow
May 20, 2025
198838c
Merge branch 'main' into razorpay-upi
Aishwariyaa-Anand May 21, 2025
798d122
chore: run formatter
hyperswitch-bot[bot] May 21, 2025
caa1035
feat: add CreateOrder for v1
May 22, 2025
d936c01
reslove comments
May 23, 2025
42be684
chore: run formatter
hyperswitch-bot[bot] May 23, 2025
2f51bb7
Merge branch 'main' into razorpay-upi
Aishwariyaa-Anand May 26, 2025
8108551
fix ci checks
May 27, 2025
8f80130
refactor: add wait screen and display connector error
May 28, 2025
271622d
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] May 28, 2025
efa0ca8
add generate_connector_request_reference_id
May 30, 2025
bc8fbcf
Merge branch 'main' into razorpay-upi
Aishwariyaa-Anand May 30, 2025
a54bdd4
add connector_request_reference_id in payment_attempt
Jun 2, 2025
6543d87
refactor: get_billing_email
Jun 3, 2025
cf66933
apply suggestions
Jun 3, 2025
179f446
chore: run formatter
hyperswitch-bot[bot] Jun 3, 2025
1ebef5b
fix: openapi changes
Jun 3, 2025
049d344
generate openapi
Jun 3, 2025
e85677f
add connector error resp
Jun 4, 2025
2393bd0
Merge branch 'main' into razorpay-upi
Aishwariyaa-Anand Jun 5, 2025
05bb06a
add connector unexpected error
Jun 5, 2025
8dd7313
refactor: connector response error
Jun 7, 2025
b96073a
apply suggestions
Jun 9, 2025
83dc2bf
docs(openapi): re-generate OpenAPI specification
hyperswitch-bot[bot] Jun 9, 2025
63a2767
remove comment
Jun 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -14186,6 +14186,14 @@
"type": "integer",
"nullable": true
},
"poll_config": {
"allOf": [
{
"$ref": "#/components/schemas/PollConfig"
}
],
"nullable": true
},
"type": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -20269,6 +20277,25 @@
}
}
},
"PollConfig": {
"type": "object",
"required": [
"delay_in_secs",
"frequency"
],
"properties": {
"delay_in_secs": {
"type": "integer",
"format": "int32",
"description": "Interval of the poll"
},
"frequency": {
"type": "integer",
"format": "int32",
"description": "Frequency of the poll"
}
}
},
"PollConfigResponse": {
"type": "object",
"required": [
Expand Down
27 changes: 27 additions & 0 deletions api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -16400,6 +16400,14 @@
"type": "integer",
"nullable": true
},
"poll_config": {
"allOf": [
{
"$ref": "#/components/schemas/PollConfig"
}
],
"nullable": true
},
"type": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -24265,6 +24273,25 @@
}
}
},
"PollConfig": {
"type": "object",
"required": [
"delay_in_secs",
"frequency"
],
"properties": {
"delay_in_secs": {
"type": "integer",
"format": "int32",
"description": "Interval of the poll"
},
"frequency": {
"type": "integer",
"format": "int32",
"description": "Frequency of the poll"
}
}
},
"PollConfigResponse": {
"type": "object",
"required": [
Expand Down
2 changes: 1 addition & 1 deletion config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ plaid.base_url = "https://sandbox.plaid.com"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://sandboxapi.rapyd.net"
razorpay.base_url = "https://sandbox.juspay.in/"
razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis-t.redsys.es:25443"
riskified.base_url = "https://sandbox.riskified.com/api"
Expand Down
2 changes: 1 addition & 1 deletion config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ plaid.base_url = "https://sandbox.plaid.com"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://sandboxapi.rapyd.net"
razorpay.base_url = "https://sandbox.juspay.in/"
razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis-t.redsys.es:25443"
shift4.base_url = "https://api.shift4.com/"
Expand Down
2 changes: 1 addition & 1 deletion config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ plaid.base_url = "https://production.plaid.com"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://api.rapyd.net"
razorpay.base_url = "https://api.juspay.in"
razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis.redsys.es"
riskified.base_url = "https://wh.riskified.com/api/"
Expand Down
2 changes: 1 addition & 1 deletion config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ plaid.base_url = "https://sandbox.plaid.com"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://sandboxapi.rapyd.net"
razorpay.base_url = "https://sandbox.juspay.in/"
razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis-t.redsys.es:25443"
riskified.base_url = "https://sandbox.riskified.com/api"
Expand Down
2 changes: 1 addition & 1 deletion config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ plaid.base_url = "https://sandbox.plaid.com"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://sandboxapi.rapyd.net"
razorpay.base_url = "https://sandbox.juspay.in/"
razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis-t.redsys.es:25443"
riskified.base_url = "https://sandbox.riskified.com/api"
Expand Down
2 changes: 1 addition & 1 deletion config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ plaid.base_url = "https://sandbox.plaid.com"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://sandboxapi.rapyd.net"
razorpay.base_url = "https://sandbox.juspay.in/"
razorpay.base_url = "https://api.razorpay.com/"
recurly.base_url = "https://v3.recurly.com"
redsys.base_url = "https://sis-t.redsys.es:25443"
riskified.base_url = "https://sandbox.riskified.com/api"
Expand Down
10 changes: 10 additions & 0 deletions crates/api_models/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4540,6 +4540,7 @@ pub enum NextActionData {
WaitScreenInformation {
display_from_timestamp: i128,
display_to_timestamp: Option<i128>,
poll_config: Option<PollConfig>,
},
/// Contains the information regarding three_ds_method_data submission, three_ds authentication, and authorization flows
ThreeDsInvoke {
Expand Down Expand Up @@ -4700,6 +4701,15 @@ pub struct QrCodeNextStepsInstruction {
pub struct WaitScreenInstructions {
pub display_from_timestamp: i128,
pub display_to_timestamp: Option<i128>,
pub poll_config: Option<PollConfig>,
}

#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
pub struct PollConfig {
/// Interval of the poll
pub delay_in_secs: i8,
/// Frequency of the poll
pub frequency: i8,
}

#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
Expand Down
3 changes: 3 additions & 0 deletions crates/common_enums/src/connector_enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ impl Connector {
| (Self::Facilitapay, _)
)
}
pub fn requires_order_creation_before_payment(self, payment_method: PaymentMethod) -> bool {
matches!((self, payment_method), (Self::Razorpay, PaymentMethod::Upi))
}
pub fn supports_file_storage_module(self) -> bool {
matches!(self, Self::Stripe | Self::Checkout)
}
Expand Down
3 changes: 3 additions & 0 deletions crates/diesel_models/src/payment_attempt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ pub struct PaymentAttempt {
pub network_decline_code: Option<String>,
/// A string indicating how to proceed with an network error if payment gateway provide one. This is used to understand the network error code better.
pub network_error_message: Option<String>,
pub connector_request_reference_id: Option<String>,
}

#[cfg(feature = "v1")]
Expand Down Expand Up @@ -340,6 +341,7 @@ pub struct PaymentAttemptNew {
pub network_error_message: Option<String>,
pub processor_merchant_id: Option<id_type::MerchantId>,
pub created_by: Option<String>,
pub connector_request_reference_id: Option<String>,
}

#[cfg(feature = "v1")]
Expand Down Expand Up @@ -871,6 +873,7 @@ pub struct PaymentAttemptUpdateInternal {
pub network_decline_code: Option<String>,
pub network_advice_code: Option<String>,
pub network_error_message: Option<String>,
pub connector_request_reference_id: Option<String>,
}

#[cfg(feature = "v1")]
Expand Down
2 changes: 2 additions & 0 deletions crates/diesel_models/src/schema_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,8 @@ diesel::table! {
#[max_length = 32]
network_decline_code -> Nullable<Varchar>,
network_error_message -> Nullable<Text>,
#[max_length = 255]
connector_request_reference_id -> Nullable<Varchar>,
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use api_models::payouts::{self, PayoutMethodData};
use api_models::{
enums,
payments::{self, QrCodeInformation, VoucherNextStepData},
payments::{self, PollConfig, QrCodeInformation, VoucherNextStepData},
};
use cards::CardNumber;
use common_enums::enums as storage_enums;
Expand Down Expand Up @@ -4227,6 +4227,7 @@ pub fn get_qr_metadata(
pub struct WaitScreenData {
display_from_timestamp: i128,
display_to_timestamp: Option<i128>,
poll_config: Option<PollConfig>,
}

pub fn get_wait_screen_metadata(
Expand All @@ -4237,14 +4238,16 @@ pub fn get_wait_screen_metadata(
let current_time = OffsetDateTime::now_utc().unix_timestamp_nanos();
Ok(Some(serde_json::json!(WaitScreenData {
display_from_timestamp: current_time,
display_to_timestamp: Some(current_time + Duration::minutes(1).whole_nanoseconds())
display_to_timestamp: Some(current_time + Duration::minutes(1).whole_nanoseconds()),
poll_config: None
})))
}
PaymentType::Mbway => {
let current_time = OffsetDateTime::now_utc().unix_timestamp_nanos();
Ok(Some(serde_json::json!(WaitScreenData {
display_from_timestamp: current_time,
display_to_timestamp: None
display_to_timestamp: None,
poll_config: None
})))
}
PaymentType::Affirm
Expand Down
Loading
Loading