Skip to content

Commit f3224cc

Browse files
jarnuraSangamesh26vspeckyAbhicodes-cryptojagan-jaya
authored
chore: merging back release v0.3.0 back to main (#636) (#655)
Co-authored-by: Sangamesh Kulkarni <[email protected]> Co-authored-by: ItsMeShashank <[email protected]> Co-authored-by: Abhishek <[email protected]> Co-authored-by: Jagan <[email protected]> Co-authored-by: SamraatBansal <[email protected]> Co-authored-by: Sampras Lopes <[email protected]>
1 parent 7792de5 commit f3224cc

Some content is hidden

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

74 files changed

+5976
-352
lines changed

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,64 @@
1+
# 0.3.0 (2023-02-25)
2+
3+
## Build System / Dependencies
4+
5+
* **docker-compose:** increase docker health check interval for hyperswitch-server (#534)
6+
7+
## Chores
8+
9+
* **release:** port release bug fixes to main branch (#612) (a8d6ce83)
10+
11+
## Continuous Integration
12+
13+
* run CI checks on merge queue events (#530) (c7b9e9c1)
14+
15+
## Documentation Changes
16+
17+
* **add_connector:** fix typo (#584) (a4f3abf3)
18+
19+
## New Features
20+
21+
* **router:**
22+
* include eligible connectors list in list payment methods (#644) (92771b3b)
23+
* API endpoints for managing API keys (#511) (1bdc8955)
24+
* **connector:**
25+
* [Airwallex] add authorize, capture, void, psync, Webhooks support (#646) (6a67dd8b)
26+
* [Bluesnap] add authorize, capture, void, refund, psync, rsync and Webhooks support (#649) (7efdc3c5)
27+
* add authorize, capture, void, refund, psync support for Nuvei (#645) (03a9f5a9)
28+
* Added applepay feature (#636) (1e84c07c)
29+
* add `track_caller` to functions that perform `change_context` (#592) (8d2e573a)
30+
* Redis cache for MCA fetch and update (#515) (963cb528)
31+
* **api_models:** add error structs (#532) (d107b44f)
32+
33+
## Bug Fixes
34+
35+
* **connector:** update Bluesnap in routable connectors (#654) (64cb2ffc)
36+
* allow errors with status code 200 to pass (#601) (8a8767e9)
37+
* don't call connector if connector transaction id doesn't exist (#525) (326d6beb)
38+
* throw 500 error when redis goes down (#531) (aafb115a)
39+
* **router:**
40+
* allow setup future usage to be updated in payment update and confirm requests (#610) (#638) (6c128f82)
41+
* feature gate openssl deps for basilisk feature (#536) (e4956820)
42+
* **checkout:** Error Response when wrong api key is passed (#596) (55b6d88a)
43+
* **core:** use guard for access token result (#522) (903b4521)
44+
45+
## Other Changes
46+
47+
* **router:**
48+
* webhooks enhancement (#637) (#641) (3bc9feb0)
49+
* api keys path params (#609) (effa7a00)
50+
51+
## Refactors
52+
53+
* **router:**
54+
* update payments api contract to accept a list of connectors (#643) (8f1f626c)
55+
* api-key routes refactoring (#600) (e6408276)
56+
* appstate as trait in authentication (#588) (eaf98e66)
57+
* **compatibility:** add additional fields to stripe payment and refund response types (#618) (2ea09e34)
58+
* Throw 500 error on database connection error instead of panic (#527) (f1e3bf48)
59+
* send full payment object for payment sync (#526) (6c2a1fea)
60+
* **middleware:** change visibility to `pub` (#587) (4884a24d)
61+
162
# 0.2.1 (2023-02-17)
263

364
## Fixes

Cargo.lock

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/Development.toml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,26 @@ locker_decryption_key1 = ""
4343
locker_decryption_key2 = ""
4444

4545
[connectors.supported]
46-
wallets = ["klarna","braintree","applepay"]
47-
cards = ["stripe","adyen","authorizedotnet","checkout","braintree","aci","shift4","cybersource", "worldpay", "globalpay", "fiserv", "payu", "worldline", "dlocal"]
46+
wallets = ["klarna", "braintree", "applepay"]
47+
cards = [
48+
"aci",
49+
"adyen",
50+
"airwallex",
51+
"authorizedotnet",
52+
"bluesnap",
53+
"braintree",
54+
"checkout",
55+
"cybersource",
56+
"dlocal",
57+
"fiserv",
58+
"globalpay",
59+
"nuvei",
60+
"payu",
61+
"shift4",
62+
"stripe",
63+
"worldline",
64+
"worldpay",
65+
]
4866

4967
[refund]
5068
max_attempts = 10
@@ -104,6 +122,15 @@ base_url = "https://apis.sandbox.globalpay.com/ucp/"
104122
[connectors.worldline]
105123
base_url = "https://eu.sandbox.api-ingenico.com/"
106124

125+
[connectors.bluesnap]
126+
base_url = "https://sandbox.bluesnap.com/"
127+
128+
[connectors.nuvei]
129+
base_url = "https://ppp-test.nuvei.com/"
130+
131+
[connectors.airwallex]
132+
base_url = "https://api-demo.airwallex.com/"
133+
107134
[connectors.dlocal]
108135
base_url = "https://sandbox.dlocal.com/"
109136

config/config.example.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,19 @@ base_url = "https://try.access.worldpay.com/"
153153
[connectors.globalpay]
154154
base_url = "https://apis.sandbox.globalpay.com/ucp/"
155155

156-
# This data is used to call respective connectors for wallets and cards
156+
[connectors.bluesnap]
157+
base_url = "https://sandbox.bluesnap.com/"
158+
159+
[connectors.nuvei]
160+
base_url = "https://ppp-test.nuvei.com/"
161+
162+
[connectors.airwallex]
163+
base_url = "https://api-demo.airwallex.com/"
164+
157165
[connectors.dlocal]
158166
base_url = "https://sandbox.dlocal.com/"
159167

168+
# This data is used to call respective connectors for wallets and cards
160169
[connectors.supported]
161170
wallets = ["klarna", "braintree", "applepay"]
162171
cards = [

config/docker_compose.toml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,43 @@ base_url = "https://try.access.worldpay.com/"
105105
[connectors.globalpay]
106106
base_url = "https://apis.sandbox.globalpay.com/ucp/"
107107

108+
[connectors.bluesnap]
109+
base_url = "https://sandbox.bluesnap.com/"
110+
111+
[connectors.nuvei]
112+
base_url = "https://ppp-test.nuvei.com/"
113+
114+
[connectors.airwallex]
115+
base_url = "https://api-demo.airwallex.com/"
116+
108117
[connectors.dlocal]
109118
base_url = "https://sandbox.dlocal.com/"
110119

111120
[connectors.supported]
112121
wallets = ["klarna", "braintree", "applepay"]
113-
cards = ["stripe", "adyen", "authorizedotnet", "checkout", "braintree", "shift4", "cybersource", "worldpay", "globalpay", "fiserv", "dlocal"]
122+
cards = [
123+
"adyen",
124+
"airwallex",
125+
"authorizedotnet",
126+
"bluesnap",
127+
"braintree",
128+
"checkout",
129+
"cybersource",
130+
"dlocal",
131+
"fiserv",
132+
"globalpay",
133+
"nuvei",
134+
"payu",
135+
"shift4",
136+
"stripe",
137+
"worldline",
138+
"worldpay",
139+
]
114140

115141

116142
[scheduler]
117143
stream = "SCHEDULER_STREAM"
118144

119145
[scheduler.consumer]
120146
disabled = false
121-
consumer_group = "SCHEDULER_GROUP"
147+
consumer_group = "SCHEDULER_GROUP"

connector-template/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,14 @@ impl
110110
fn get_url(&self, _req: &types::PaymentsAuthorizeRouterData, _connectors: &settings::Connectors,) -> CustomResult<String,errors::ConnectorError> {
111111
Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
112112
}
113-
113+
114114
fn get_request_body(&self, req: &types::PaymentsAuthorizeRouterData) -> CustomResult<Option<String>,errors::ConnectorError> {
115+
let req_obj = {{project-name | downcase}}::{{project-name | downcase | pascal_case}}PaymentsRequest::try_from(req)?;
115116
let {{project-name | downcase}}_req =
116-
utils::Encode::<{{project-name | downcase}}::{{project-name | downcase | pascal_case}}PaymentsRequest>::convert_and_encode(req).change_context(errors::ConnectorError::RequestEncodingFailed)?;
117+
utils::Encode::<{{project-name | downcase}}::{{project-name | downcase | pascal_case}}PaymentsRequest>::encode_to_string_of_json(
118+
&req_obj,
119+
)
120+
.change_context(errors::ConnectorError::RequestEncodingFailed)?;
117121
Ok(Some({{project-name | downcase}}_req))
118122
}
119123

connector-template/test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ async fn should_void_authorized_payment() {
106106
Some(types::PaymentsCancelData {
107107
connector_transaction_id: String::from(""),
108108
cancellation_reason: Some("requested_by_customer".to_string()),
109+
..Default::default()
109110
}),
110111
None,
111112
)

crates/api_models/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ serde = { version = "1.0.152", features = ["derive"] }
1616
serde_json = "1.0.91"
1717
strum = { version = "0.24.1", features = ["derive"] }
1818
time = { version = "0.3.17", features = ["serde", "serde-well-known", "std"] }
19+
url = { version = "2.3.1", features = ["serde"] }
1920
utoipa = { version = "3.0.1", features = ["preserve_order"] }
2021

2122
# First party crates

crates/api_models/src/admin.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use common_utils::pii;
22
use masking::{Secret, StrongSecret};
33
use serde::{Deserialize, Serialize};
4+
use url;
45
use utoipa::ToSchema;
56

67
use super::payments::AddressDetails;
@@ -26,7 +27,7 @@ pub struct CreateMerchantAccount {
2627

2728
/// The URL to redirect after the completion of the operation
2829
#[schema(max_length = 255, example = "https://www.example.com/success")]
29-
pub return_url: Option<String>,
30+
pub return_url: Option<url::Url>,
3031

3132
/// Webhook related details
3233
pub webhook_details: Option<WebhookDetails>,

crates/api_models/src/enums.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use utoipa::ToSchema;
1111
serde::Serialize,
1212
strum::Display,
1313
strum::EnumString,
14+
frunk::LabelledGeneric,
1415
)]
1516
#[serde(rename_all = "snake_case")]
1617
#[strum(serialize_all = "snake_case")]
@@ -572,8 +573,10 @@ pub enum MandateStatus {
572573
pub enum Connector {
573574
Aci,
574575
Adyen,
576+
Airwallex,
575577
Applepay,
576578
Authorizedotnet,
579+
Bluesnap,
577580
Braintree,
578581
Checkout,
579582
Cybersource,
@@ -583,6 +586,7 @@ pub enum Connector {
583586
Fiserv,
584587
Globalpay,
585588
Klarna,
589+
Nuvei,
586590
Payu,
587591
Rapyd,
588592
Shift4,
@@ -593,7 +597,7 @@ pub enum Connector {
593597

594598
impl Connector {
595599
pub fn supports_access_token(&self) -> bool {
596-
matches!(self, Self::Globalpay | Self::Payu)
600+
matches!(self, Self::Airwallex | Self::Globalpay | Self::Payu)
597601
}
598602
}
599603

@@ -614,14 +618,17 @@ impl Connector {
614618
pub enum RoutableConnectors {
615619
Aci,
616620
Adyen,
621+
Airwallex,
617622
Authorizedotnet,
623+
Bluesnap,
618624
Braintree,
619625
Checkout,
620626
Cybersource,
621627
Dlocal,
622628
Fiserv,
623629
Globalpay,
624630
Klarna,
631+
Nuvei,
625632
Payu,
626633
Rapyd,
627634
Shift4,

0 commit comments

Comments
 (0)