Skip to content

Commit

Permalink
Merge branch 'main' into change-serde-value-to-strict-type-in-domain-…
Browse files Browse the repository at this point in the history
…and-diesel-model
  • Loading branch information
hrithikesh026 committed Nov 5, 2024
2 parents c02924f + 22ba2db commit 734c7e0
Show file tree
Hide file tree
Showing 65 changed files with 4,432 additions and 2,621 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ All notable changes to HyperSwitch will be documented here.

- - -

## 2024.11.05.0

### Features

- Add macro to generate ToEncryptable trait ([#6313](https://github.com/juspay/hyperswitch/pull/6313)) ([`19cf0f7`](https://github.com/juspay/hyperswitch/commit/19cf0f7437a8d16ee4da254d2a3e2659879be68c))

### Bug Fixes

- **analytics:** Add dynamic limit by clause in failure reasons metric query ([#6462](https://github.com/juspay/hyperswitch/pull/6462)) ([`8825378`](https://github.com/juspay/hyperswitch/commit/88253780d708bc1c005a87c186c4b0b14325c8a0))

### Refactors

- **connector:** [AIRWALLEX, MULTISAFEPAY, RAZORPAY, SHIFT4, WORLDPAY, ZSL] Move connectors from `router` to `hyperswitch_connectors` crate ([#6369](https://github.com/juspay/hyperswitch/pull/6369)) ([`72ee434`](https://github.com/juspay/hyperswitch/commit/72ee434003eef744d516343a2f803264f226d92a))

**Full Changelog:** [`2024.11.04.0...2024.11.05.0`](https://github.com/juspay/hyperswitch/compare/2024.11.04.0...2024.11.05.0)

- - -

## 2024.11.04.0

### Features
Expand Down
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions INSTALL_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ set -o nounset

# utilities
# convert semver to comparable integer
if [[ `id -u` -ne 0 ]]; then
if [[ "$(id -u)" -ne 0 ]]; then
print_info "requires sudo"
SUDO=sudo
else
SUDO=""
fi

ver () {
printf "%03d%03d%03d%03d" `echo "$1" | tr '.' ' '`;
printf "%03d%03d%03d%03d" "$(echo "$1" | tr '.' ' ')";
}

PROGNAME=`basename $0`
PROGNAME="$(basename $0)"
print_info () {
echo -e "$PROGNAME: $*"
}
Expand Down Expand Up @@ -125,10 +125,10 @@ if command -v cargo > /dev/null; then

need_cmd rustc

RUST_VERSION=`rustc -V | cut -d " " -f 2`
RUST_VERSION="$(rustc -V | cut -d " " -f 2)"

_HAVE_VERSION=`ver ${RUST_VERSION}`
_NEED_VERSION=`ver ${RUST_MSRV}`
_HAVE_VERSION="$(ver ${RUST_VERSION})"
_NEED_VERSION="$(ver ${RUST_MSRV})"

print_info "Found rust version \"${RUST_VERSION}\". MSRV is \"${RUST_MSRV}\""

Expand Down Expand Up @@ -166,7 +166,7 @@ install_dep () {
$INSTALL_CMD $*
}

if [[ ! -x "`command -v psql`" ]] || [[ ! -x "`command -v redis-server`" ]] ; then
if [[ ! -x "$(command -v psql)" ]] || [[ ! -x "$(command -v redis-server)" ]] ; then
print_info "Missing dependencies. Trying to install"

# java has an apt which seems to mess up when we look for apt
Expand Down
16 changes: 0 additions & 16 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -17045,22 +17045,6 @@
}
}
},
"RefundAggregateResponse": {
"type": "object",
"required": [
"status_with_count"
],
"properties": {
"status_with_count": {
"type": "object",
"description": "The list of refund status with their count",
"additionalProperties": {
"type": "integer",
"format": "int64"
}
}
}
},
"RefundErrorDetails": {
"type": "object",
"required": [
Expand Down
16 changes: 0 additions & 16 deletions api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -21824,22 +21824,6 @@
}
}
},
"RefundAggregateResponse": {
"type": "object",
"required": [
"status_with_count"
],
"properties": {
"status_with_count": {
"type": "object",
"description": "The list of refund status with their count",
"additionalProperties": {
"type": "integer",
"format": "int64"
}
}
}
},
"RefundListRequest": {
"allOf": [
{
Expand Down
50 changes: 24 additions & 26 deletions aws/hyperswitch_aws_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,37 +38,35 @@ echo "Creating Security Group for Application..."

export EC2_SG="application-sg"

echo `(aws ec2 create-security-group \
echo "$(aws ec2 create-security-group \
--region $REGION \
--group-name $EC2_SG \
--description "Security Group for Hyperswitch EC2 instance" \
--tag-specifications "ResourceType=security-group,Tags=[{Key=ManagedBy,Value=hyperswitch}]" \
)`
--tag-specifications "ResourceType=security-group,Tags=[{Key=ManagedBy,Value=hyperswitch}]")"

export APP_SG_ID=$(aws ec2 describe-security-groups --group-names $EC2_SG --region $REGION --output text --query 'SecurityGroups[0].GroupId')

echo "Security Group for Application CREATED.\n"

echo "Creating Security Group ingress for port 80..."

echo `aws ec2 authorize-security-group-ingress \
echo "$(aws ec2 authorize-security-group-ingress \
--group-id $APP_SG_ID \
--protocol tcp \
--port 80 \
--cidr 0.0.0.0/0 \
--region $REGION`
--region $REGION)"

echo "Security Group ingress for port 80 CREATED.\n"


echo "Creating Security Group ingress for port 22..."

echo `aws ec2 authorize-security-group-ingress \
echo "$(aws ec2 authorize-security-group-ingress \
--group-id $APP_SG_ID \
--protocol tcp \
--port 22 \
--cidr 0.0.0.0/0 \
--region $REGION`
--region $REGION)"

echo "Security Group ingress for port 22 CREATED.\n"

Expand All @@ -78,11 +76,11 @@ echo "Security Group ingress for port 22 CREATED.\n"
echo "Creating Security Group for Elasticache..."

export REDIS_GROUP_NAME=redis-sg
echo `aws ec2 create-security-group \
echo "$(aws ec2 create-security-group \
--group-name $REDIS_GROUP_NAME \
--description "SG attached to elasticache" \
--tag-specifications "ResourceType=security-group,Tags=[{Key=ManagedBy,Value=hyperswitch}]" \
--region $REGION`
--region $REGION)"

echo "Security Group for Elasticache CREATED.\n"

Expand All @@ -91,12 +89,12 @@ echo "Creating Inbound rules for Redis..."
export REDIS_SG_ID=$(aws ec2 describe-security-groups --group-names $REDIS_GROUP_NAME --region $REGION --output text --query 'SecurityGroups[0].GroupId')

# CREATE INBOUND RULES
echo `aws ec2 authorize-security-group-ingress \
echo "$(aws ec2 authorize-security-group-ingress \
--group-id $REDIS_SG_ID \
--protocol tcp \
--port 6379 \
--source-group $EC2_SG \
--region $REGION`
--region $REGION)"

echo "Inbound rules for Redis CREATED.\n"

Expand All @@ -105,11 +103,11 @@ echo "Inbound rules for Redis CREATED.\n"
echo "Creating Security Group for RDS..."

export RDS_GROUP_NAME=rds-sg
echo `aws ec2 create-security-group \
echo "$(aws ec2 create-security-group \
--group-name $RDS_GROUP_NAME \
--description "SG attached to RDS" \
--tag-specifications "ResourceType=security-group,Tags=[{Key=ManagedBy,Value=hyperswitch}]" \
--region $REGION`
--region $REGION)"

echo "Security Group for RDS CREATED.\n"

Expand All @@ -118,44 +116,44 @@ echo "Creating Inbound rules for RDS..."
export RDS_SG_ID=$(aws ec2 describe-security-groups --group-names $RDS_GROUP_NAME --region $REGION --output text --query 'SecurityGroups[0].GroupId')

# CREATE INBOUND RULES
echo `aws ec2 authorize-security-group-ingress \
echo "$(aws ec2 authorize-security-group-ingress \
--group-id $RDS_SG_ID \
--protocol tcp \
--port 5432 \
--source-group $EC2_SG \
--region $REGION`
--region $REGION)"

echo "Inbound rules for RDS CREATED.\n"

echo `aws ec2 authorize-security-group-ingress \
echo "$(aws ec2 authorize-security-group-ingress \
--group-id $RDS_SG_ID \
--protocol tcp \
--port 5432 \
--cidr 0.0.0.0/0 \
--region $REGION`
--region $REGION)"

echo "Inbound rules for RDS (from any IP) CREATED.\n"

echo "Creating Elasticache with Redis engine..."

export CACHE_CLUSTER_ID=hyperswitch-cluster

echo `aws elasticache create-cache-cluster \
echo "$(aws elasticache create-cache-cluster \
--cache-cluster-id $CACHE_CLUSTER_ID \
--cache-node-type cache.t3.medium \
--engine redis \
--num-cache-nodes 1 \
--security-group-ids $REDIS_SG_ID \
--engine-version 7.0 \
--tags "Key=ManagedBy,Value=hyperswitch" \
--region $REGION`
--region $REGION)"

echo "Elasticache with Redis engine CREATED.\n"

echo "Creating RDS with PSQL..."

export DB_INSTANCE_ID=hyperswitch-db
echo `aws rds create-db-instance \
echo "$(aws rds create-db-instance \
--db-instance-identifier $DB_INSTANCE_ID\
--db-instance-class db.t3.micro \
--engine postgres \
Expand All @@ -166,7 +164,7 @@ echo `aws rds create-db-instance \
--region $REGION \
--db-name hyperswitch_db \
--tags "Key=ManagedBy,Value=hyperswitch" \
--vpc-security-group-ids $RDS_SG_ID`
--vpc-security-group-ids $RDS_SG_ID)"

echo "RDS with PSQL CREATED.\n"

Expand Down Expand Up @@ -308,17 +306,17 @@ echo "EC2 instance launched.\n"

echo "Add Tags to EC2 instance..."

echo `aws ec2 create-tags \
echo "$(aws ec2 create-tags \
--resources $HYPERSWITCH_INSTANCE_ID \
--tags "Key=Name,Value=hyperswitch-router" \
--region $REGION`
--region $REGION)"

echo "Tag added to EC2 instance.\n"

echo `aws ec2 create-tags \
echo "$(aws ec2 create-tags \
--resources $HYPERSWITCH_INSTANCE_ID \
--tags "Key=ManagedBy,Value=hyperswitch" \
--region $REGION`
--region $REGION)"

echo "ManagedBy tag added to EC2 instance.\n"

Expand Down
14 changes: 7 additions & 7 deletions aws/hyperswitch_cleanup_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ for cluster_arn in $ALL_ELASTIC_CACHE; do
if [[ $? -eq 0 ]]; then
echo -n "Delete $cluster_id (Y/n)? "
if yes_or_no; then
echo `aws elasticache delete-cache-cluster --region $REGION --cache-cluster-id $cluster_id`
echo "$(aws elasticache delete-cache-cluster --region $REGION --cache-cluster-id $cluster_id)"
fi
fi
done
Expand All @@ -59,7 +59,7 @@ echo -n "Deleting ( $ALL_KEY_PAIRS ) key pairs? (Y/n)?"

if yes_or_no; then
for KEY_ID in $ALL_KEY_PAIRS; do
echo `aws ec2 delete-key-pair --key-pair-id $KEY_ID --region $REGION`
echo "$(aws ec2 delete-key-pair --key-pair-id $KEY_ID --region $REGION)"
done
fi

Expand All @@ -78,7 +78,7 @@ echo -n "Terminating ( $ALL_INSTANCES ) instances? (Y/n)?"

if yes_or_no; then
for INSTANCE_ID in $ALL_INSTANCES; do
echo `aws ec2 terminate-instances --instance-ids $INSTANCE_ID --region $REGION`
echo "$(aws ec2 terminate-instances --instance-ids $INSTANCE_ID --region $REGION)"
done
fi

Expand All @@ -105,15 +105,15 @@ for resource_id in $ALL_DB_RESOURCES; do

echo -n "Create a snapshot before deleting ( $DB_INSTANCE_ID ) the database (Y/n)? "
if yes_or_no; then
echo `aws rds delete-db-instance \
echo "$(aws rds delete-db-instance \
--db-instance-identifier $DB_INSTANCE_ID \
--region $REGION \
--final-db-snapshot-identifier hyperswitch-db-snapshot-`date +%s``
--final-db-snapshot-identifier hyperswitch-db-snapshot-$(date +%s))"
else
echo `aws rds delete-db-instance \
echo "$(aws rds delete-db-instance \
--region $REGION \
--db-instance-identifier $DB_INSTANCE_ID \
--skip-final-snapshot`
--skip-final-snapshot)"
fi
fi
fi
Expand Down
1 change: 1 addition & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ digitalvirgo.base_url = "https://dcb-integration-service-sandbox-external.stagin
dlocal.base_url = "https://sandbox.dlocal.com/"
dummyconnector.base_url = "http://localhost:8080/dummy-connector"
ebanx.base_url = "https://sandbox.ebanxpay.com/"
elavon.base_url = "https://api.demo.convergepay.com"
fiserv.base_url = "https://cert.api.fiservapps.com/"
fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox"
fiuu.base_url = "https://sandbox.merchant.razer.com/"
Expand Down
1 change: 1 addition & 0 deletions config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ digitalvirgo.base_url = "https://dcb-integration-service-sandbox-external.stagin
dlocal.base_url = "https://sandbox.dlocal.com/"
dummyconnector.base_url = "http://localhost:8080/dummy-connector"
ebanx.base_url = "https://sandbox.ebanxpay.com/"
elavon.base_url = "https://api.demo.convergepay.com"
fiserv.base_url = "https://cert.api.fiservapps.com/"
fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox"
fiuu.base_url = "https://sandbox.merchant.razer.com/"
Expand Down
1 change: 1 addition & 0 deletions config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ digitalvirgo.base_url = "https://dcb-integration-service-sandbox-external.stagin
dlocal.base_url = "https://sandbox.dlocal.com/"
dummyconnector.base_url = "http://localhost:8080/dummy-connector"
ebanx.base_url = "https://sandbox.ebanxpay.com/"
elavon.base_url = "https://api.convergepay.com"
fiserv.base_url = "https://cert.api.fiservapps.com/"
fiservemea.base_url = "https://prod.emea.api.fiservapps.com"
fiuu.base_url = "https://pay.merchant.razer.com/"
Expand Down
1 change: 1 addition & 0 deletions config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ digitalvirgo.base_url = "https://dcb-integration-service-sandbox-external.stagin
dlocal.base_url = "https://sandbox.dlocal.com/"
dummyconnector.base_url = "http://localhost:8080/dummy-connector"
ebanx.base_url = "https://sandbox.ebanxpay.com/"
elavon.base_url = "https://api.demo.convergepay.com"
fiserv.base_url = "https://cert.api.fiservapps.com/"
fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox"
fiuu.base_url = "https://sandbox.merchant.razer.com/"
Expand Down
2 changes: 2 additions & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ cards = [
"dlocal",
"dummyconnector",
"ebanx",
"elavon",
"fiserv",
"fiservemea",
"fiuu",
Expand Down Expand Up @@ -216,6 +217,7 @@ digitalvirgo.base_url = "https://dcb-integration-service-sandbox-external.stagin
dlocal.base_url = "https://sandbox.dlocal.com/"
dummyconnector.base_url = "http://localhost:8080/dummy-connector"
ebanx.base_url = "https://sandbox.ebanxpay.com/"
elavon.base_url = "https://api.demo.convergepay.com"
fiserv.base_url = "https://cert.api.fiservapps.com/"
fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox"
fiuu.base_url = "https://sandbox.merchant.razer.com/"
Expand Down
Loading

0 comments on commit 734c7e0

Please sign in to comment.