Skip to content

Commit

Permalink
Merge branch 'main' into netcetra-refactor-#5930
Browse files Browse the repository at this point in the history
  • Loading branch information
hex1c committed Nov 10, 2024
2 parents f81ba20 + ce95b65 commit eaf7ec0
Show file tree
Hide file tree
Showing 504 changed files with 42,332 additions and 28,190 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ crates/test_utils/tests/connectors/ @juspay/hyperswitch-connector
crates/test_utils/tests/sample_auth.toml @juspay/hyperswitch-connector
crates/connector_configs/ @juspay/hyperswitch-connector
crates/hyperswitch_connectors/ @juspay/hyperswitch-connector
crates/api_models/src/connector_enums.rs @juspay/hyperswitch-connector
crates/common_enums/src/connector_enums.rs @juspay/hyperswitch-connector
crates/router/src/configs/defaults/payment_connector_required_fields.rs @juspay/hyperswitch-connector
crates/hyperswitch_interfaces/src/configs.rs @juspay/hyperswitch-connector

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ jobs:

- name: Run cargo clippy with v2 features enabled
shell: bash
run: just clippy_v2 -- -D warnings -Aunused -Aclippy::todo -Aclippy::diverging_sub_expression
run: just clippy_v2

- name: Run cargo check enabling only the release and v2 features
shell: bash
Expand Down
33 changes: 7 additions & 26 deletions .github/workflows/cypress-tests-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ concurrency:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
CONNECTORS: stripe
PAYMENTS_CONNECTORS: "stripe"
PAYOUTS_CONNECTORS: "wise"
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
RUN_TESTS: ${{ ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}}
Expand Down Expand Up @@ -68,7 +69,7 @@ jobs:
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
CONNECTOR_CREDS_S3_BUCKET_URI: ${{ secrets.CONNECTOR_CREDS_S3_BUCKET_URI}}
DESTINATION_FILE_NAME: "creds.json.gpg"
S3_SOURCE_FILE_NAME: "f64157fe-a8f7-43a8-a268-b17e9a8c305f.json.gpg"
S3_SOURCE_FILE_NAME: "5a3f7679-445e-4621-86c5-39bd8d26b7c5.json.gpg"
shell: bash
run: |
mkdir -p ".github/secrets" ".github/test"
Expand Down Expand Up @@ -158,7 +159,7 @@ jobs:
- name: Build project
if: ${{ env.RUN_TESTS == 'true' }}
run: cargo build --package router --bin router --jobs 4
run: cargo build --package router --bin router --jobs 3

- name: Setup Local Server
if: ${{ env.RUN_TESTS == 'true' }}
Expand Down Expand Up @@ -186,29 +187,10 @@ jobs:
if: ${{ env.RUN_TESTS == 'true' }}
env:
CYPRESS_BASEURL: "http://localhost:8080"
ROUTER__SERVER__WORKERS: 4
shell: bash -leuo pipefail {0}
run: |
cd cypress-tests
RED='\033[0;31m'
RESET='\033[0m'
failed_connectors=()
for connector in $(echo "${CONNECTORS}" | tr "," "\n"); do
echo "${connector}"
for service in "payments" "payouts"; do
if ! ROUTER__SERVER__WORKERS=4 CYPRESS_CONNECTOR="${connector}" npm run cypress:"${service}"; then
failed_connectors+=("${connector}-${service}")
fi
done
done
if [ ${#failed_connectors[@]} -gt 0 ]; then
echo -e "${RED}One or more connectors failed to run:${RESET}"
printf '%s\n' "${failed_connectors[@]}"
exit 1
fi
scripts/execute_cypress.sh --parallel 3
kill "${{ env.PID }}"
Expand All @@ -218,6 +200,5 @@ jobs:
with:
name: cypress-test-results
path: |
cypress-tests/cypress/reports/*.json
cypress-tests/cypress/reports/*.html
cypress-tests/cypress/reports/
retention-days: 1
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,9 @@ result*
node_modules/

# cypress credentials
creds.json
creds.json

/.direnv

# Nix services data
/data
4 changes: 3 additions & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[default]
check-filename = true
extend-ignore-identifiers-re = [
"UE_[0-9]{3,4}", # Unified error codes
]

[default.extend-identifiers]
ABD = "ABD" # Aberdeenshire, UK ISO 3166-2 code
Expand Down Expand Up @@ -38,7 +41,6 @@ ws2ipdef = "ws2ipdef" # WinSock Extension
ws2tcpip = "ws2tcpip" # WinSock Extension
ZAR = "ZAR" # South African Rand currency code
JOD = "JOD" # Jordan currency code
UE_000 = "UE_000" #default unified error code


[default.extend-words]
Expand Down
276 changes: 276 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

14 changes: 11 additions & 3 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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The single API to access payment ecosystems across 130+ countries</div>

<p align="center">
<a href="https://github.com/juspay/hyperswitch/actions?query=workflow%3ACI+branch%3Amain">
<img src="https://github.com/juspay/hyperswitch/workflows/CI/badge.svg" />
<img src="https://github.com/juspay/hyperswitch/workflows/CI-push/badge.svg" />
</a>
<a href="https://github.com/juspay/hyperswitch/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/juspay/hyperswitch" />
Expand All @@ -44,7 +44,6 @@ The single API to access payment ecosystems across 130+ countries</div>
</p>

<hr>
<img src="./docs/imgs/switch.png" />

Hyperswitch is a community-led, open payments switch designed to empower digital businesses by providing fast, reliable, and affordable access to the best payments infrastructure.

Expand All @@ -58,7 +57,8 @@ Here are the components of Hyperswitch that deliver the whole solution:

Jump in and contribute to these repositories to help improve and expand Hyperswitch!

<br>
<img src="./docs/imgs/switch.png" />


<a href="#Quick Setup">
<h2 id="quick-setup">⚡️ Quick Setup</h2>
Expand Down
2 changes: 1 addition & 1 deletion add_connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl TryFrom<types::PaymentsResponseRouterData<PaymentsResponse>>
let payments_response_data = types::PaymentsResponseData::TransactionResponse {
resource_id: types::ResponseId::ConnectorTransactionId(item.response.id.clone()),
redirection_data,
mandate_reference: None,
mandate_reference: Box::new(None),
connector_metadata: None,
network_txn_id: None,
connector_response_reference_id: Some(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: post /v2/payments/{id}/confirm-intent
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: get /v2/payments/{id}/get-intent
---
3 changes: 3 additions & 0 deletions api-reference-v2/api-reference/refunds/refunds--create.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: post /v2/refunds
---
10 changes: 9 additions & 1 deletion api-reference-v2/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"group": "Payments",
"pages": [
"api-reference/payments/payments--create-intent",
"api-reference/payments/payments--session-token"
"api-reference/payments/payments--get-intent",
"api-reference/payments/payments--session-token",
"api-reference/payments/payments--confirm-intent"
]
},
{
Expand Down Expand Up @@ -107,6 +109,12 @@
"api-reference/customers/customers--delete",
"api-reference/customers/customers--list"
]
},
{
"group": "Refunds",
"pages": [
"api-reference/refunds/refunds--create"
]
}
],
"footerSocials": {
Expand Down
Loading

0 comments on commit eaf7ec0

Please sign in to comment.