Skip to content

Commit

Permalink
Merge branch 'main' into issue-2023
Browse files Browse the repository at this point in the history
  • Loading branch information
kritikmodi committed Aug 29, 2023
2 parents a6eabd5 + d804b23 commit ef1958c
Show file tree
Hide file tree
Showing 85 changed files with 1,744 additions and 372 deletions.
Binary file modified .github/secrets/connector_auth.toml.gpg
Binary file not shown.
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,42 @@ All notable changes to HyperSwitch will be documented here.

- - -

## 1.29.0 (2023-08-29)

### Features

- **connector:** [Paypal] add support for payment and refund webhooks ([#2003](https://github.com/juspay/hyperswitch/pull/2003)) ([`ade27f0`](https://github.com/juspay/hyperswitch/commit/ade27f01686d2a0cdee86d4d366cecaa12370ba6))

### Bug Fixes

- **connector:** [Payme] populate error message in case of 2xx payment failures ([#2037](https://github.com/juspay/hyperswitch/pull/2037)) ([`aeebc5b`](https://github.com/juspay/hyperswitch/commit/aeebc5b52584ad8d8c128fa896d39fe8576dca0c))
- **router:** Remove `attempt_count` in payments list response and add it in payments response ([#2008](https://github.com/juspay/hyperswitch/pull/2008)) ([`23b8d34`](https://github.com/juspay/hyperswitch/commit/23b8d3412c7d14e450b87b3ccb35a394d954d0a7))

### Miscellaneous Tasks

- **creds:** Update connector API credentials ([#2034](https://github.com/juspay/hyperswitch/pull/2034)) ([`f04bee2`](https://github.com/juspay/hyperswitch/commit/f04bee261141622b63e34e1ebd4b0de4641e0210))
- Address Rust 1.72 clippy lints ([#2011](https://github.com/juspay/hyperswitch/pull/2011)) ([`eaefa6e`](https://github.com/juspay/hyperswitch/commit/eaefa6e15c4facc28440d7fdc3aac9be0976324d))

**Full Changelog:** [`v1.28.1...v1.29.0`](https://github.com/juspay/hyperswitch/compare/v1.28.1...v1.29.0)

- - -


## 1.28.1 (2023-08-28)

### Bug Fixes

- **connector:** [Noon] handle 2 digit exp year and 3ds checked status ([#2022](https://github.com/juspay/hyperswitch/pull/2022)) ([`322c615`](https://github.com/juspay/hyperswitch/commit/322c615c56c37554ae9760b9a584bf3b0032cf43))

### Refactors

- **postman:** Remove `routing algorithm` struct from `merchant account create` ([#2032](https://github.com/juspay/hyperswitch/pull/2032)) ([`3d4f750`](https://github.com/juspay/hyperswitch/commit/3d4f750089b97f0fde0e74b833bf386327fb4a52))

**Full Changelog:** [`v1.28.0...v1.28.1`](https://github.com/juspay/hyperswitch/compare/v1.28.0...v1.28.1)

- - -


## 1.28.0 (2023-08-28)

### Features
Expand Down
2 changes: 2 additions & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ fiserv.base_url = "https://cert.api.fiservapps.com/"
forte.base_url = "https://sandbox.forte.net/api/v3"
globalpay.base_url = "https://apis.sandbox.globalpay.com/ucp/"
globepay.base_url = "https://pay.globepay.co/"
helcim.base_url = "https://api.helcim.com/"
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
klarna.base_url = "https://api-na.playground.klarna.com/"
mollie.base_url = "https://api.mollie.com/v2/"
Expand Down Expand Up @@ -242,6 +243,7 @@ cards = [
"cybersource",
"globalpay",
"globepay",
"helcim",
"mollie",
"paypal",
"shift4",
Expand Down
2 changes: 2 additions & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ cards = [
"forte",
"globalpay",
"globepay",
"helcim",
"iatapay",
"mollie",
"multisafepay",
Expand Down Expand Up @@ -142,6 +143,7 @@ fiserv.base_url = "https://cert.api.fiservapps.com/"
forte.base_url = "https://sandbox.forte.net/api/v3"
globalpay.base_url = "https://apis.sandbox.globalpay.com/ucp/"
globepay.base_url = "https://pay.globepay.co/"
helcim.base_url = "https://api.helcim.com/"
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
klarna.base_url = "https://api-na.playground.klarna.com/"
mollie.base_url = "https://api.mollie.com/v2/"
Expand Down
2 changes: 2 additions & 0 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ fiserv.base_url = "https://cert.api.fiservapps.com/"
forte.base_url = "https://sandbox.forte.net/api/v3"
globalpay.base_url = "https://apis.sandbox.globalpay.com/ucp/"
globepay.base_url = "https://pay.globepay.co/"
helcim.base_url = "https://api.helcim.com/"
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
klarna.base_url = "https://api-na.playground.klarna.com/"
mollie.base_url = "https://api.mollie.com/v2/"
Expand Down Expand Up @@ -152,6 +153,7 @@ cards = [
"forte",
"globalpay",
"globepay",
"helcim",
"iatapay",
"mollie",
"multisafepay",
Expand Down
2 changes: 2 additions & 0 deletions crates/api_models/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ pub enum Connector {
Forte,
Globalpay,
Globepay,
//Helcim, added as template code for future usage,
Iatapay,
Klarna,
Mollie,
Expand Down Expand Up @@ -204,6 +205,7 @@ pub enum RoutableConnectors {
Forte,
Globalpay,
Globepay,
//Helcim, added as template code for future usage,
Iatapay,
Klarna,
Mollie,
Expand Down
5 changes: 3 additions & 2 deletions crates/api_models/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1905,6 +1905,9 @@ pub struct PaymentsResponse {

/// The business profile that is associated with this payment
pub profile_id: Option<String>,

/// total number of attempts associated with this payment
pub attempt_count: i16,
}

#[derive(Clone, Debug, serde::Deserialize, ToSchema)]
Expand Down Expand Up @@ -1970,8 +1973,6 @@ pub struct PaymentListConstraints {
pub struct PaymentListResponse {
/// The number of payments included in the list
pub size: usize,
/// The total number of payment_attempts for intents included in the list
pub attempt_count: i16,
// The list of payments response objects
pub data: Vec<PaymentsResponse>,
}
Expand Down
4 changes: 4 additions & 0 deletions crates/data_models/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
pub type StorageResult<T> = error_stack::Result<T, StorageError>;

#[derive(Debug, thiserror::Error)]
pub enum StorageError {
#[error("Initialization Error")]
InitializationError,
// TODO: deprecate this error type to use a domain error instead
#[error("DatabaseError: {0:?}")]
DatabaseError(String),
Expand Down
4 changes: 4 additions & 0 deletions crates/drainer/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ pub async fn redis_connection(
.expect("Failed to create Redis connection Pool")
}

// TODO: use stores defined in storage_impl instead
/// # Panics
///
/// Will panic if could not create a db pool
#[allow(clippy::expect_used)]
pub async fn diesel_make_pg_pool(
database: &Database,
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/configs/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@ pub struct Connectors {
pub forte: ConnectorParams,
pub globalpay: ConnectorParams,
pub globepay: ConnectorParams,
pub helcim: ConnectorParams,
pub iatapay: ConnectorParams,
pub klarna: ConnectorParams,
pub mollie: ConnectorParams,
Expand Down
4 changes: 4 additions & 0 deletions crates/router/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ pub type PgPool = bb8::Pool<async_bb8_diesel::ConnectionManager<PgConnection>>;

pub type PgPooledConn = async_bb8_diesel::Connection<PgConnection>;

///
/// # Panics
///
/// Panics if failed to create a redis pool
#[allow(clippy::expect_used)]
pub async fn redis_connection(
conf: &crate::configs::settings::Settings,
Expand Down
3 changes: 2 additions & 1 deletion crates/router/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub mod fiserv;
pub mod forte;
pub mod globalpay;
pub mod globepay;
pub mod helcim;
pub mod iatapay;
pub mod klarna;
pub mod mollie;
Expand Down Expand Up @@ -54,7 +55,7 @@ pub use self::{
bambora::Bambora, bitpay::Bitpay, bluesnap::Bluesnap, boku::Boku, braintree::Braintree,
cashtocode::Cashtocode, checkout::Checkout, coinbase::Coinbase, cryptopay::Cryptopay,
cybersource::Cybersource, dlocal::Dlocal, fiserv::Fiserv, forte::Forte, globalpay::Globalpay,
globepay::Globepay, iatapay::Iatapay, klarna::Klarna, mollie::Mollie,
globepay::Globepay, helcim::Helcim, iatapay::Iatapay, klarna::Klarna, mollie::Mollie,
multisafepay::Multisafepay, nexinets::Nexinets, nmi::Nmi, noon::Noon, nuvei::Nuvei,
opayo::Opayo, opennode::Opennode, payeezy::Payeezy, payme::Payme, paypal::Paypal, payu::Payu,
powertranz::Powertranz, rapyd::Rapyd, shift4::Shift4, square::Square, stax::Stax,
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/connector/checkout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ impl api::FileUpload for Checkout {
match purpose {
api::FilePurpose::DisputeEvidence => {
let supported_file_types =
vec!["image/jpeg", "image/jpg", "image/png", "application/pdf"];
["image/jpeg", "image/jpg", "image/png", "application/pdf"];
// 4 Megabytes (MB)
if file_size > 4000000 {
Err(errors::ConnectorError::FileValidationFailed {
Expand Down
Loading

0 comments on commit ef1958c

Please sign in to comment.