Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Azanul authored Oct 12, 2023
2 parents f652c21 + 550377a commit ed9fd41
Show file tree
Hide file tree
Showing 95 changed files with 3,612 additions and 412 deletions.
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ crates/router/src/services/ @juspay/hyperswitch-framework
crates/router/src/db/ @juspay/hyperswitch-framework
crates/router/src/routes/ @juspay/hyperswitch-framework
migrations/ @juspay/hyperswitch-framework
openapi/ @juspay/hyperswitch-framework

connector-template/ @juspay/hyperswitch-connector
crates/router/src/connector/ @juspay/hyperswitch-connector
crates/router/tests/connectors @juspay/hyperswitch-connector
crates/router/tests/connectors/ @juspay/hyperswitch-connector
crates/test_utils/tests/connectors/ @juspay/hyperswitch-connector
crates/test_utils/tests/sample_auth.toml @juspay/hyperswitch-connector

crates/router/src/compatibility/ @juspay/hyperswitch-compatibility

Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/create-hotfix-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Create hotfix branch

on:
workflow_dispatch:

jobs:
create_branch:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.AUTO_RELEASE_PAT }}

- name: Check if the input is valid tag
shell: bash
run: |
if [[ ${{github.ref}} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::notice::${{github.ref}} is a valid tag."
else
echo "::error::${{github.ref}} is not a valid tag."
exit 1
fi
- name: Create hotfix branch
shell: bash
run: |
HOTFIX_BRANCH="hotfix-${GITHUB_REF#refs/tags/v}"
if git switch --create "$HOTFIX_BRANCH"; then
git push origin "$HOTFIX_BRANCH"
echo "::notice::Created hotfix branch: $HOTFIX_BRANCH"
else
echo "::error::Failed to create hotfix branch"
exit 1
fi
100 changes: 100 additions & 0 deletions .github/workflows/create-hotfix-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Create tag on hotfix branch

on:
workflow_dispatch:

jobs:
create_tag:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.AUTO_RELEASE_PAT }}

- name: Install git-cliff
uses: baptiste0928/cargo-install@v2.1.0
with:
crate: git-cliff
version: 1.2.0

- name: Check if the input is valid hotfix branch
shell: bash
run: |
if [[ ${{github.ref}} =~ ^refs/heads/hotfix-[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::notice::${{github.ref}} is a valid branch."
else
echo "::error::${{github.ref}} is not a valid branch."
exit 1
fi
- name: Check if the latest commit is tag
shell: bash
run: |
if [[ -z "$(git tag --points-at HEAD)" ]]; then
echo "::notice::The latest commit is not a tag "
else
echo "::error::The latest commit on the branch is already a tag"
exit 1
fi
- name: Determine current and next tag
shell: bash
run: |
function get_next_tag() {
local previous_tag="${1}"
local previous_hotfix_number
local next_tag
previous_hotfix_number="$(echo "${previous_tag}" | awk -F. '{ print $4 }')"
if [[ -z "${previous_hotfix_number}" ]]; then
# Previous tag was not a hotfix tag
next_tag="${previous_tag}+hotfix.1"
else
# Previous tag was a hotfix tag, increment hotfix number
local hotfix_number=$((previous_hotfix_number + 1))
next_tag="${previous_tag/%${previous_hotfix_number}/${hotfix_number}}"
fi
echo "${next_tag}"
}
PREVIOUS_TAG="$(git tag --merged | sort --version-sort | tail --lines 1)"
NEXT_TAG="$(get_next_tag "${PREVIOUS_TAG}")"
echo "PREVIOUS_TAG=${PREVIOUS_TAG}" >> $GITHUB_ENV
echo "NEXT_TAG=${NEXT_TAG}" >> $GITHUB_ENV
- name: Generate changelog
shell: bash
run: |
# Generate changelog content and store it in `release-notes.md`
git-cliff --config '.github/git-cliff-changelog.toml' --strip header --tag "${NEXT_TAG}" "${PREVIOUS_TAG}^.." \
| sed "/## ${PREVIOUS_TAG#v}\$/,\$d" \
| sed '$s/$/\n- - -/' > release-notes.md
# Append release notes after the specified pattern in CHANGELOG.md
sed --in-place '0,/^- - -/!b; /^- - -/{
a
r release-notes.md
}' CHANGELOG.md
rm release-notes.md
- name: Set Git Configuration
shell: bash
run: |
git config --local user.name 'github-actions'
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Push created commit and tag
shell: bash
run: |
# Stage, commit and tag the changelog
git add CHANGELOG.md
git commit --message "chore(version): ${NEXT_TAG}"
git tag --message "$(git show --no-patch --format=%s HEAD)" "${NEXT_TAG}" HEAD
git push
git push --tags
2 changes: 1 addition & 1 deletion .github/workflows/release-new-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release a new version

on:
schedule:
- cron: "30 14 * * 1-5" # Run workflow at 8 PM IST every Monday-Friday
- cron: "30 14 * * 0-4" # Run workflow at 8 PM IST every Sunday-Thursday

workflow_dispatch:

Expand Down
27 changes: 24 additions & 3 deletions .github/workflows/validate-openapi-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,21 @@ jobs:
name: Validate generated OpenAPI spec file
runs-on: ubuntu-latest
steps:
- name: Checkout PR
if: ${{ github.event_name == 'pull_request' }}
- name: Checkout PR from fork
if: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) }}
uses: actions/checkout@v3
with:
# Checkout pull request branch instead of merge commit
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Checkout PR with token
if: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.AUTO_FILE_UPDATE_PAT }}

- name: Checkout merge group HEAD commit
if: ${{ github.event_name == 'merge_group' }}
uses: actions/checkout@v3
Expand All @@ -47,7 +54,21 @@ jobs:
shell: bash
run: swagger-cli validate ./openapi/openapi_spec.json

- name: Commit the JSON file if it is not up-to-date
# PR originated from same repository
if: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) }}
shell: bash
run: |
if ! git diff --quiet --exit-code -- openapi/openapi_spec.json ; then
git config --local user.name 'github-actions[bot]'
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add openapi/openapi_spec.json
git commit --message 'docs(openapi): re-generate OpenAPI specification'
git push
fi
- name: Fail check if the JSON file is not up-to-date
if: ${{ (github.event_name == 'merge_group') || ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)) }}
shell: bash
run: |
if ! git diff --quiet --exit-code -- openapi/openapi_spec.json ; then
Expand Down
89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,95 @@ All notable changes to HyperSwitch will be documented here.

- - -

## 1.56.0 (2023-10-11)

### Features

- **connector:**
- [Volt] Template generation ([#2480](https://github.com/juspay/hyperswitch/pull/2480)) ([`ee321bb`](https://github.com/juspay/hyperswitch/commit/ee321bb82686559643d8c2725b0491997af717b2))
- [NexiNets] Update connector_response_reference_id as reference to merchant ([#2537](https://github.com/juspay/hyperswitch/pull/2537)) ([`2f6c00a`](https://github.com/juspay/hyperswitch/commit/2f6c00a1fd853876333608a7d1fa6b488c3001d3))
- [Authorizedotnet] use connector_response_reference_id as reference to merchant ([#2497](https://github.com/juspay/hyperswitch/pull/2497)) ([`62638c4`](https://github.com/juspay/hyperswitch/commit/62638c4230bfd149c43c2805cbad0ce9be5386b3))
- **router:** Change temp locker config as enable only ([#2522](https://github.com/juspay/hyperswitch/pull/2522)) ([`7acf101`](https://github.com/juspay/hyperswitch/commit/7acf10101435ab97d93490e19eaac5373d34f531))

### Refactors

- Delete requires cvv config when merchant account is deleted ([#2525](https://github.com/juspay/hyperswitch/pull/2525)) ([`b968552`](https://github.com/juspay/hyperswitch/commit/b9685521735956659c50bc2e1c15b08cb9952aee))

### Testing

- **postman:**
- Add proper `customer_id` in payment method create api ([#2548](https://github.com/juspay/hyperswitch/pull/2548)) ([`7994a12`](https://github.com/juspay/hyperswitch/commit/7994a1259c5852ba4ebabb906bef963c6cf81bc9))
- Update postman collection files ([`7c561d5`](https://github.com/juspay/hyperswitch/commit/7c561d57767001e755fc9abfc32352ffdc9aacea))

### Miscellaneous Tasks

- **CODEOWNERS:** Update CODEOWNERS ([#2541](https://github.com/juspay/hyperswitch/pull/2541)) ([`d9fb5d4`](https://github.com/juspay/hyperswitch/commit/d9fb5d4a52f44809ab4a1576a99e97b4c8b8c41b))

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

- - -


## 1.55.0 (2023-10-10)

### Features

- **connector:**
- [Multisafepay] Use connector_request_reference_id as reference to the connector ([#2503](https://github.com/juspay/hyperswitch/pull/2503)) ([`c34f1bf`](https://github.com/juspay/hyperswitch/commit/c34f1bf36ffb3a3533dd51ac87e7f66ab0dcce79))
- [GlobalPayments] Introduce connector_request_reference_id for GlobalPayments ([#2519](https://github.com/juspay/hyperswitch/pull/2519)) ([`116139b`](https://github.com/juspay/hyperswitch/commit/116139ba7ae6878b7018068b0cb8303a8e8d1f7a))
- [Airwallex] Use connector_request_reference_id as merchant reference id #2291 ([#2516](https://github.com/juspay/hyperswitch/pull/2516)) ([`6e89e41`](https://github.com/juspay/hyperswitch/commit/6e89e4103da4ecf6d7f06f7a9ec7da64eb493a6e))
- **trace:** Add optional sampling behaviour for routes ([#2511](https://github.com/juspay/hyperswitch/pull/2511)) ([`ec51e48`](https://github.com/juspay/hyperswitch/commit/ec51e48402da63e1250328485095b8665d7eca65))
- Gracefully shutdown drainer if redis goes down ([#2391](https://github.com/juspay/hyperswitch/pull/2391)) ([`2870af1`](https://github.com/juspay/hyperswitch/commit/2870af1286e897be0d40c014bc5742eafc6795db))
- Kv for reverse lookup ([#2445](https://github.com/juspay/hyperswitch/pull/2445)) ([`13aaf96`](https://github.com/juspay/hyperswitch/commit/13aaf96db0f62dc7a706ba2ba230912ee7ef7a68))
- Add x-hs-latency header for application overhead measurement ([#2486](https://github.com/juspay/hyperswitch/pull/2486)) ([`cf0db35`](https://github.com/juspay/hyperswitch/commit/cf0db35923d39caca9bf267b7d87a3f215884b66))

### Bug Fixes

- **connector:**
- [Airwallex] convert expiry year to four digit ([#2527](https://github.com/juspay/hyperswitch/pull/2527)) ([`4b0fa12`](https://github.com/juspay/hyperswitch/commit/4b0fa1295ca8f4e611b65fbf2458c38b89303d3b))
- [noon] add missing response status ([#2528](https://github.com/juspay/hyperswitch/pull/2528)) ([`808ee45`](https://github.com/juspay/hyperswitch/commit/808ee45556f90b1c1360a3edbffe9ba3603439d4))

### Refactors

- **payment_methods:** Added mca_id in bank details ([#2495](https://github.com/juspay/hyperswitch/pull/2495)) ([`ac3c500`](https://github.com/juspay/hyperswitch/commit/ac3c5008f80172a575f2fb08b7a5e78016ce7595))
- **test_utils:** Refactor `test_utils` crate and add `folder` support with updated documentation ([#2487](https://github.com/juspay/hyperswitch/pull/2487)) ([`6b52ac3`](https://github.com/juspay/hyperswitch/commit/6b52ac3d398d5a180c1dc67c5b53702ad01a0773))

### Miscellaneous Tasks

- [GOCARDLESS] env changes for becs and sepa mandates ([#2535](https://github.com/juspay/hyperswitch/pull/2535)) ([`4f5a383`](https://github.com/juspay/hyperswitch/commit/4f5a383bab567a1b46b2d6990c0c23ed60f1201b))

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

- - -


## 1.54.0 (2023-10-09)

### Features

- **connector:**
- [Fiserv] update connector_response_reference_id in transformers ([#2489](https://github.com/juspay/hyperswitch/pull/2489)) ([`4eb7003`](https://github.com/juspay/hyperswitch/commit/4eb70034336e5ff42c9eea912d940ea04cae9326))
- [Nuvei] Use "connector_request_reference_id" for as "attempt_id" to improve consistency in transmitting payment information ([#2493](https://github.com/juspay/hyperswitch/pull/2493)) ([`17393f5`](https://github.com/juspay/hyperswitch/commit/17393f5be3e9027fedf9466c6401754f3c4d6b99))
- **kv:** Add kv wrapper for executing kv tasks ([#2384](https://github.com/juspay/hyperswitch/pull/2384)) ([`8b50997`](https://github.com/juspay/hyperswitch/commit/8b50997e56307507be101c562aa70d0a9b429137))
- **process_tracker:** Make long standing payments failed ([#2380](https://github.com/juspay/hyperswitch/pull/2380)) ([`73dfc31`](https://github.com/juspay/hyperswitch/commit/73dfc31f9d16d2cf71de8433fb630bea941a7020))

### Bug Fixes

- Add release feature to drianer ([#2507](https://github.com/juspay/hyperswitch/pull/2507)) ([`224b83c`](https://github.com/juspay/hyperswitch/commit/224b83c51d53fb1ca9ae11ff2f60b7b6cc807fc8))

### Refactors

- Disable color in reports in json format ([#2509](https://github.com/juspay/hyperswitch/pull/2509)) ([`aa176c7`](https://github.com/juspay/hyperswitch/commit/aa176c7c5d79f68c8bd97a3248fd4d40e937a3ce))

### Miscellaneous Tasks

- Address Rust 1.73 clippy lints ([#2474](https://github.com/juspay/hyperswitch/pull/2474)) ([`e02838e`](https://github.com/juspay/hyperswitch/commit/e02838eb5d3da97ef573926ded4a318ed24b6f1c))

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

- - -


## 1.53.0 (2023-10-09)

### Features
Expand Down
22 changes: 15 additions & 7 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ port = 5432 # DB Port
dbname = "hyperswitch_db" # Name of Database
pool_size = 5 # Number of connections to keep open
connection_timeout = 10 # Timeout for database connection in seconds
queue_strategy = "Fifo" # Add the queue strategy used by the database bb8 client

# Replica SQL data store credentials
[replica_database]
Expand All @@ -38,6 +39,7 @@ port = 5432 # DB Port
dbname = "hyperswitch_db" # Name of Database
pool_size = 5 # Number of connections to keep open
connection_timeout = 10 # Timeout for database connection in seconds
queue_strategy = "Fifo" # Add the queue strategy used by the database bb8 client

# Redis credentials
[redis]
Expand Down Expand Up @@ -93,6 +95,7 @@ sampling_rate = 0.1 # decimal rate between 0.0
otel_exporter_otlp_endpoint = "http://localhost:4317" # endpoint to send metrics and traces to, can include port number
otel_exporter_otlp_timeout = 5000 # timeout (in milliseconds) for sending metrics and traces
use_xray_generator = false # Set this to true for AWS X-ray compatible traces
route_to_trace = [ "*/confirm" ]

# This section provides some secret values.
[secrets]
Expand Down Expand Up @@ -203,12 +206,13 @@ square.secondary_base_url = "https://pci-connect.squareupsandbox.com/"
stax.base_url = "https://apiprod.fattlabs.com/"
stripe.base_url = "https://api.stripe.com/"
stripe.base_url_file_upload = "https://files.stripe.com/"
trustpay.base_url = "https://test-tpgw.trustpay.eu/"
trustpay.base_url_bank_redirects = "https://aapi.trustpay.eu/"
tsys.base_url = "https://stagegw.transnox.com/"
volt.base_url = "https://api.sandbox.volt.io/"
wise.base_url = "https://api.sandbox.transferwise.tech/"
worldline.base_url = "https://eu.sandbox.api-ingenico.com/"
worldpay.base_url = "https://try.access.worldpay.com/"
trustpay.base_url = "https://test-tpgw.trustpay.eu/"
tsys.base_url = "https://stagegw.transnox.com/"
trustpay.base_url_bank_redirects = "https://aapi.trustpay.eu/"
zen.base_url = "https://api.zen-test.com/"
zen.secondary_base_url = "https://secure.zen-test.com/"

Expand Down Expand Up @@ -318,9 +322,11 @@ square = {long_lived_token = false, payment_method = "card"}
braintree = { long_lived_token = false, payment_method = "card" }
gocardless = {long_lived_token = true, payment_method = "bank_debit"}

[temp_locker_disable_config]
trustpay = {payment_method = "card,bank_redirect,wallet"}
stripe = {payment_method = "card,bank_redirect,pay_later,wallet,bank_debit"}
[temp_locker_enable_config]
stripe = {payment_method = "bank_transfer"}
nuvei = {payment_method = "card"}
shift4 = {payment_method = "card"}
bluesnap = {payment_method = "card"}

[dummy_connector]
enabled = true # Whether dummy connector is enabled or not
Expand All @@ -347,6 +353,8 @@ card.credit = {connector_list = "stripe,adyen"} # Mandate supported payment
wallet.paypal = {connector_list = "adyen"} # Mandate supported payment method type and connector for wallets
pay_later.klarna = {connector_list = "adyen"} # Mandate supported payment method type and connector for pay_later
bank_debit.ach = { connector_list = "gocardless"} # Mandate supported payment method type and connector for bank_debit
bank_debit.becs = { connector_list = "gocardless"} # Mandate supported payment method type and connector for bank_debit
bank_debit.sepa = { connector_list = "gocardless"} # Mandate supported payment method type and connector for bank_debit

# Required fields info used while listing the payment_method_data
[required_fields.pay_later] # payment_method = "pay_later"
Expand Down Expand Up @@ -422,4 +430,4 @@ supported_connectors = "braintree"
apple_pay_ppc = "APPLE_PAY_PAYMENT_PROCESSING_CERTIFICATE" #Payment Processing Certificate provided by Apple Pay (https://developer.apple.com/) Certificates, Identifiers & Profiles > Apple Pay Payment Processing Certificate
apple_pay_ppc_key = "APPLE_PAY_PAYMENT_PROCESSING_CERTIFICATE_KEY" #Private key generate by Elliptic-curve prime256v1 curve
apple_pay_merchant_cert = "APPLE_PAY_MERCHNAT_CERTIFICATE" #Merchant Certificate provided by Apple Pay (https://developer.apple.com/) Certificates, Identifiers & Profiles > Apple Pay Merchant Identity Certificate
apple_pay_merchant_cert_key = "APPLE_PAY_MERCHNAT_CERTIFICATE_KEY" #Private key generate by RSA:2048 algorithm
apple_pay_merchant_cert_key = "APPLE_PAY_MERCHNAT_CERTIFICATE_KEY" #Private key generate by RSA:2048 algorithm
Loading

0 comments on commit ed9fd41

Please sign in to comment.