Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into frm_manual_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kashif-m committed Jan 16, 2024
2 parents 7499d19 + 1bbd9d5 commit ef14282
Show file tree
Hide file tree
Showing 138 changed files with 4,960 additions and 1,099 deletions.
4 changes: 0 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,3 @@ result*

# node_modules
node_modules/

**/connector_auth.toml
**/sample_auth.toml
**/auth.toml
87 changes: 19 additions & 68 deletions .github/workflows/release-nightly-version-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ name: Create a nightly tag
on:
workflow_call:
secrets:
app_id:
description: App ID for the GitHub app
required: true
app_private_key:
description: Private key for the GitHub app
token:
description: GitHub token for authenticating with GitHub
required: true
outputs:
tag:
Expand All @@ -31,23 +28,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Generate GitHub app token
id: generate_app_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.app_id }}
private-key: ${{ secrets.app_private_key }}

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

- name: Check if the workflow is run on an allowed branch
shell: bash
run: |
if [[ "${{github.ref}}" != "refs/heads/${ALLOWED_BRANCH_NAME}" ]]; then
echo "::error::This workflow is expected to be run from the '${ALLOWED_BRANCH_NAME}' branch. Current branch: '${{github.ref}}'"
if [[ "${{ github.ref }}" != "refs/heads/${ALLOWED_BRANCH_NAME}" ]]; then
echo "::error::This workflow is expected to be run from the '${ALLOWED_BRANCH_NAME}' branch. Current branch: '${{ github.ref }}'"
exit 1
fi
Expand Down Expand Up @@ -139,62 +130,22 @@ jobs:
}' CHANGELOG.md
rm release-notes.md
# We make use of GitHub API calls to commit and tag the changelog instead of the simpler
# `git commit`, `git tag` and `git push` commands to have signed commits and tags
- name: Commit generated changelog and create tag
- 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: Commit, tag and push generated changelog
shell: bash
env:
GH_TOKEN: ${{ steps.generate_app_token.outputs.token }}
run: |
HEAD_COMMIT="$(git rev-parse 'HEAD^{commit}')"
# Create a tree based on the HEAD commit of the current branch and updated changelog file
TREE_SHA="$(
gh api \
--method POST \
--header 'Accept: application/vnd.github+json' \
--header 'X-GitHub-Api-Version: 2022-11-28' \
'/repos/{owner}/{repo}/git/trees' \
--raw-field base_tree="${HEAD_COMMIT}" \
--raw-field 'tree[][path]=CHANGELOG.md' \
--raw-field 'tree[][mode]=100644' \
--raw-field 'tree[][type]=blob' \
--field 'tree[][content][email protected]' \
--jq '.sha'
)"
# Create a commit to point to the above created tree
NEW_COMMIT_SHA="$(
gh api \
--method POST \
--header 'Accept: application/vnd.github+json' \
--header 'X-GitHub-Api-Version: 2022-11-28' \
'/repos/{owner}/{repo}/git/commits' \
--raw-field "message=chore(version): ${NEXT_TAG}" \
--raw-field "parents[]=${HEAD_COMMIT}" \
--raw-field "tree=${TREE_SHA}" \
--jq '.sha'
)"
# Update the current branch to point to the above created commit
# We disable forced update so that the workflow will fail if the branch has been updated since the workflow started
# (for example, new commits were pushed to the branch after the workflow execution started).
gh api \
--method PATCH \
--header 'Accept: application/vnd.github+json' \
--header 'X-GitHub-Api-Version: 2022-11-28' \
"/repos/{owner}/{repo}/git/refs/heads/${ALLOWED_BRANCH_NAME}" \
--raw-field "sha=${NEW_COMMIT_SHA}" \
--field 'force=false'
# Create a lightweight tag to point to the above created commit
gh api \
--method POST \
--header 'Accept: application/vnd.github+json' \
--header 'X-GitHub-Api-Version: 2022-11-28' \
'/repos/{owner}/{repo}/git/refs' \
--raw-field "ref=refs/tags/${NEXT_TAG}" \
--raw-field "sha=${NEW_COMMIT_SHA}"
git add CHANGELOG.md
git commit --message "chore(version): ${NEXT_TAG}"
git tag "${NEXT_TAG}" HEAD
git push origin "${ALLOWED_BRANCH_NAME}"
git push origin "${NEXT_TAG}"
- name: Set job outputs
shell: bash
Expand Down
84 changes: 16 additions & 68 deletions .github/workflows/release-nightly-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Generate GitHub app token
id: generate_app_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}
private-key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}

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

- name: Check if the workflow is run on an allowed branch
shell: bash
run: |
if [[ "${{github.ref}}" != "refs/heads/${ALLOWED_BRANCH_NAME}" ]]; then
echo "::error::This workflow is expected to be run from the '${ALLOWED_BRANCH_NAME}' branch. Current branch: '${{github.ref}}'"
if [[ "${{ github.ref }}" != "refs/heads/${ALLOWED_BRANCH_NAME}" ]]; then
echo "::error::This workflow is expected to be run from the '${ALLOWED_BRANCH_NAME}' branch. Current branch: '${{ github.ref }}'"
exit 1
fi
Expand Down Expand Up @@ -80,72 +74,26 @@ jobs:
echo "Postman collection files have no modifications"
fi
- name: Commit updated Postman collections if modified
- name: Set git configuration
shell: bash
env:
GH_TOKEN: ${{ steps.generate_app_token.outputs.token }}
if: ${{ env.POSTMAN_COLLECTION_FILES_UPDATED == 'true' }}
run: |
# Obtain current HEAD commit SHA and use that as base tree SHA for creating a new tree
HEAD_COMMIT="$(git rev-parse 'HEAD^{commit}')"
UPDATED_TREE_SHA="${HEAD_COMMIT}"
# Obtain the flags to be passed to the GitHub CLI.
# Each line contains the flags to be used corresponding to the file.
lines="$(
git ls-files \
--format '--raw-field tree[][path]=%(path) --raw-field tree[][mode]=%(objectmode) --raw-field tree[][type]=%(objecttype) --field tree[][content]=@%(path)' \
postman/collection-json
)"
# Create a tree based on the HEAD commit of the current branch, using the contents of the updated Postman collections directory
while IFS= read -r line; do
# Split each line by space to obtain the flags passed to the GitHub CLI as an array
IFS=' ' read -ra flags <<< "${line}"
# Create a tree by updating each collection JSON file.
# The SHA of the created tree is used as the base tree SHA for updating the next collection file.
UPDATED_TREE_SHA="$(
gh api \
--method POST \
--header 'Accept: application/vnd.github+json' \
--header 'X-GitHub-Api-Version: 2022-11-28' \
'/repos/{owner}/{repo}/git/trees' \
--raw-field base_tree="${UPDATED_TREE_SHA}" \
"${flags[@]}" \
--jq '.sha'
)"
done <<< "${lines}"
# Create a commit to point to the tree with all updated collections
NEW_COMMIT_SHA="$(
gh api \
--method POST \
--header 'Accept: application/vnd.github+json' \
--header 'X-GitHub-Api-Version: 2022-11-28' \
'/repos/{owner}/{repo}/git/commits' \
--raw-field "message=chore(postman): update Postman collection files" \
--raw-field "parents[]=${HEAD_COMMIT}" \
--raw-field "tree=${UPDATED_TREE_SHA}" \
--jq '.sha'
)"
# Update the current branch to point to the above created commit.
# We disable forced update so that the workflow will fail if the branch has been updated since the workflow started
# (for example, new commits were pushed to the branch after the workflow execution started).
gh api \
--method PATCH \
--header 'Accept: application/vnd.github+json' \
--header 'X-GitHub-Api-Version: 2022-11-28' \
"/repos/{owner}/{repo}/git/refs/heads/${ALLOWED_BRANCH_NAME}" \
--raw-field "sha=${NEW_COMMIT_SHA}" \
--field 'force=false'
git config --local user.name 'github-actions'
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Commit and push updated Postman collections if modified
shell: bash
if: ${{ env.POSTMAN_COLLECTION_FILES_UPDATED == 'true' }}
run: |
git add postman
git commit --message 'chore(postman): update Postman collection files'
git push origin "${ALLOWED_BRANCH_NAME}"
create-nightly-tag:
name: Create a nightly tag
uses: ./.github/workflows/release-nightly-version-reusable.yml
needs:
- update-postman-collections
secrets:
app_id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}
app_private_key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}
token: ${{ secrets.AUTO_RELEASE_PAT }}
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,3 @@ result*

# node_modules
node_modules/

**/connector_auth.toml
**/sample_auth.toml
**/auth.toml
72 changes: 72 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,78 @@ All notable changes to HyperSwitch will be documented here.

- - -

## 2024.01.12.1

### Miscellaneous Tasks

- **config:** Add merchant_secret config for webhooks for cashtocode and volt in wasm dashboard ([#3333](https://github.com/juspay/hyperswitch/pull/3333)) ([`57f2cff`](https://github.com/juspay/hyperswitch/commit/57f2cff75e58b0a7811492a1fdb636f59dcefbd0))
- Add api reference for blocklist ([#3336](https://github.com/juspay/hyperswitch/pull/3336)) ([`f381d86`](https://github.com/juspay/hyperswitch/commit/f381d86b7c9fa79d632991c74cab53d0181231c6))

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

- - -

## 2024.01.12.0

### Features

- **connector:**
- [BOA/Cyb] Include merchant metadata in capture and void requests ([#3308](https://github.com/juspay/hyperswitch/pull/3308)) ([`5a5400c`](https://github.com/juspay/hyperswitch/commit/5a5400cf5b539996b2f327c51d4a07b4a86fd1be))
- [Volt] Add support for refund webhooks ([#3326](https://github.com/juspay/hyperswitch/pull/3326)) ([`e376f68`](https://github.com/juspay/hyperswitch/commit/e376f68c167a289957a4372df108797088ab1f6e))
- [BOA/CYB] Store AVS response in connector_metadata ([#3271](https://github.com/juspay/hyperswitch/pull/3271)) ([`e75b11e`](https://github.com/juspay/hyperswitch/commit/e75b11e98ac4c8d37c842c8ee0ccf361dcb52793))
- **euclid_wasm:** Config changes for NMI ([#3329](https://github.com/juspay/hyperswitch/pull/3329)) ([`ed07c5b`](https://github.com/juspay/hyperswitch/commit/ed07c5ba90868a3132ca90d72219db3ba8978232))
- **outgoingwebhookevent:** Adding api for query to fetch outgoing webhook events log ([#3310](https://github.com/juspay/hyperswitch/pull/3310)) ([`54d44be`](https://github.com/juspay/hyperswitch/commit/54d44bef730c0679f3535f66e89e88139d70ba2e))
- **payment_link:** Added sdk layout option payment link ([#3207](https://github.com/juspay/hyperswitch/pull/3207)) ([`6117652`](https://github.com/juspay/hyperswitch/commit/61176524ca0c11c605538a1da9a267837193e1ec))
- **router:** Payment_method block ([#3056](https://github.com/juspay/hyperswitch/pull/3056)) ([`bb09613`](https://github.com/juspay/hyperswitch/commit/bb096138b5937092badd02741fb869ee35e2e3cc))
- **users:** Invite user without email ([#3328](https://github.com/juspay/hyperswitch/pull/3328)) ([`6a47063`](https://github.com/juspay/hyperswitch/commit/6a4706323c61f3722dc543993c55084dc9ff9850))
- Feat(connector): [cybersource] Implement 3DS flow for cards ([#3290](https://github.com/juspay/hyperswitch/pull/3290)) ([`6fb3b00`](https://github.com/juspay/hyperswitch/commit/6fb3b00e82d1e3c03dc1c816ffa6353cc7991a53))
- Add support for card extended bin in payment attempt ([#3312](https://github.com/juspay/hyperswitch/pull/3312)) ([`cc3eefd`](https://github.com/juspay/hyperswitch/commit/cc3eefd317117d761cdcc76804f3510952d4cec2))

### Bug Fixes

- **core:** Surcharge with saved card failure ([#3318](https://github.com/juspay/hyperswitch/pull/3318)) ([`5a1a3da`](https://github.com/juspay/hyperswitch/commit/5a1a3da7502ce9e13546b896477d82719162d5b6))
- **refund:** Add merchant_connector_id in refund ([#3303](https://github.com/juspay/hyperswitch/pull/3303)) ([`af43b07`](https://github.com/juspay/hyperswitch/commit/af43b07e4394458db478bc16e5fb8d3b0d636a31))
- **router:** Add config to avoid connector tokenization for `apple pay` `simplified flow` ([#3234](https://github.com/juspay/hyperswitch/pull/3234)) ([`4f9c04b`](https://github.com/juspay/hyperswitch/commit/4f9c04b856761b9c0486abad4c36de191da2c460))
- Update amount_capturable based on intent_status and payment flow ([#3278](https://github.com/juspay/hyperswitch/pull/3278)) ([`469ea20`](https://github.com/juspay/hyperswitch/commit/469ea20214aa7c1a3b4b86520724c2509ae37b0b))

### Refactors

- **router:**
- Flagged order_details validation to skip validation ([#3116](https://github.com/juspay/hyperswitch/pull/3116)) ([`8626bda`](https://github.com/juspay/hyperswitch/commit/8626bda6d5aa9e7531edc7ea50ed4f30c3b7227a))
- Restricted list payment method Customer to api-key based ([#3100](https://github.com/juspay/hyperswitch/pull/3100)) ([`9eaebe8`](https://github.com/juspay/hyperswitch/commit/9eaebe8db3d83105ef1e8fc784241e1fb795dd22))

### Miscellaneous Tasks

- Remove connector auth TOML files from `.gitignore` and `.dockerignore` ([#3330](https://github.com/juspay/hyperswitch/pull/3330)) ([`9f6ef3f`](https://github.com/juspay/hyperswitch/commit/9f6ef3f2240052053b5b7df0a13a5503d8141d56))

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

- - -

## 2024.01.11.0

### Features

- **core:** Add new payments webhook events ([#3212](https://github.com/juspay/hyperswitch/pull/3212)) ([`e0e28b8`](https://github.com/juspay/hyperswitch/commit/e0e28b87c0647252918ef110cd7614c46b5cf943))
- **payment_link:** Add status page for payment link ([#3213](https://github.com/juspay/hyperswitch/pull/3213)) ([`50e4d79`](https://github.com/juspay/hyperswitch/commit/50e4d797da31b570b5920b33d77c24a21d9871e2))

### Bug Fixes

- **euclid_wasm:** Update braintree config prod ([#3288](https://github.com/juspay/hyperswitch/pull/3288)) ([`8830563`](https://github.com/juspay/hyperswitch/commit/8830563748ed20c40b7a21a66e9ad9fd02ddcf0e))

### Refactors

- **connector:** [bluesnap] add connector_txn_id fallback for webhook ([#3315](https://github.com/juspay/hyperswitch/pull/3315)) ([`a69e876`](https://github.com/juspay/hyperswitch/commit/a69e876f8212cb94202686e073005c23b1b2fc35))
- Removed basilisk feature ([#3281](https://github.com/juspay/hyperswitch/pull/3281)) ([`612f8d9`](https://github.com/juspay/hyperswitch/commit/612f8d9d5f5bcba78aa64c3128cc72be0f2860ea))

### Miscellaneous Tasks

- Nits and small code improvements found during investigation of PR#3168 ([#3259](https://github.com/juspay/hyperswitch/pull/3259)) ([`fe3cf54`](https://github.com/juspay/hyperswitch/commit/fe3cf54781302c733c1682ded2c1735544407a5f))

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

- - -

## 2024.01.10.0

### Features
Expand Down
11 changes: 3 additions & 8 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,6 @@ connectors_with_delayed_session_response = "trustpay,payme" # List of connectors
connectors_with_webhook_source_verification_call = "paypal" # List of connectors which has additional source verification api-call

[jwekey] # 4 priv/pub key pair
locker_key_identifier1 = "" # key identifier for key rotation , should be same as basilisk
locker_key_identifier2 = "" # key identifier for key rotation , should be same as basilisk
locker_encryption_key1 = "" # public key 1 in pem format, corresponding private key in basilisk
locker_encryption_key2 = "" # public key 2 in pem format, corresponding private key in basilisk
locker_decryption_key1 = "" # private key 1 in pem format, corresponding public key in basilisk
locker_decryption_key2 = "" # private key 2 in pem format, corresponding public key in basilisk
vault_encryption_key = "" # public key in pem format, corresponding private key in basilisk-hs
rust_locker_encryption_key = "" # public key in pem format, corresponding private key in rust locker
vault_private_key = "" # private key in pem format, corresponding public key in basilisk-hs
Expand Down Expand Up @@ -345,7 +339,7 @@ sts_role_session_name = "" # An identifier for the assumed role session, used to
#tokenization configuration which describe token lifetime and payment method for specific connector
[tokenization]
stripe = { long_lived_token = false, payment_method = "wallet", payment_method_type = { type = "disable_only", list = "google_pay" } }
checkout = { long_lived_token = false, payment_method = "wallet" }
checkout = { long_lived_token = false, payment_method = "wallet", apple_pay_pre_decrypt_flow = "network_tokenization" }
mollie = { long_lived_token = false, payment_method = "card" }
stax = { long_lived_token = true, payment_method = "card,bank_debit" }
square = { long_lived_token = false, payment_method = "card" }
Expand All @@ -357,6 +351,7 @@ stripe = { payment_method = "bank_transfer" }
nuvei = { payment_method = "card" }
shift4 = { payment_method = "card" }
bluesnap = { payment_method = "card" }
cybersource = {payment_method = "card"}
nmi = {payment_method = "card"}

[dummy_connector]
Expand Down Expand Up @@ -473,7 +468,7 @@ apple_pay_merchant_cert = "APPLE_PAY_MERCHNAT_CERTIFICATE" #Merchant Cer
apple_pay_merchant_cert_key = "APPLE_PAY_MERCHNAT_CERTIFICATE_KEY" #Private key generate by RSA:2048 algorithm

[payment_link]
sdk_url = "http://localhost:9090/dist/HyperLoader.js"
sdk_url = "http://localhost:9090/0.16.7/v0/HyperLoader.js"

[payment_method_auth]
redis_expiry = 900
Expand Down
Loading

0 comments on commit ef14282

Please sign in to comment.