From 7c9a858cbe128cc0d921cba5644f1c3444a7b62f Mon Sep 17 00:00:00 2001 From: aritro2002 Date: Mon, 9 Dec 2024 14:23:15 +0530 Subject: [PATCH 01/27] refactor: card validation update (#790) Co-authored-by: Pritish Budhiraja --- src/CardPattern.res | 12 ++++++------ src/CardUtils.res | 28 +++++++++++++++++++++++----- src/Payment.res | 2 +- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/CardPattern.res b/src/CardPattern.res index 08c3cb63e..1706eeb06 100644 --- a/src/CardPattern.res +++ b/src/CardPattern.res @@ -19,7 +19,7 @@ let cardPatterns = [ { issuer: "Maestro", pattern: %re( - "/^(5018|5081|5044|504681|504993|5020|502260|5038|603845|603123|6304|6759|676[1-3]|6220|504834|504817|504645|504775|600206|627741)/" + "/^(5018|5081|5044|504681|504993|5020|502260|5038|5893|603845|603123|6304|6759|676[1-3]|6220|504834|504817|504645|504775|600206|627741)/" ), cvcLength: [3, 4], length: [12, 13, 14, 15, 16, 17, 18, 19], @@ -29,7 +29,7 @@ let cardPatterns = [ { issuer: "RuPay", pattern: %re( - "/^(508227|508[5-9]|603741|60698[5-9]|60699|607[0-8]|6079[0-7]|60798[0-4]|60800[1-9]|6080[1-9]|608[1-4]|608500|6521[5-9]|652[2-9]|6530|6531[0-4]|817290|817368|817378|353800)/" + "/^(508227|508[5-9]|603741|60698[5-9]|60699|607[0-8]|6079[0-7]|60798[0-4]|60800[1-9]|6080[1-9]|608[1-4]|608500|6521[5-9]|652[2-9]|6530|6531[0-4]|817290|817368|817378|353800|82)/" ), cvcLength: [3], length: [16], @@ -38,7 +38,7 @@ let cardPatterns = [ }, { issuer: "DinersClub", - pattern: %re("/^(36|38|30[0-5])/"), + pattern: %re("/^(36|38|39|30[0-5])/"), cvcLength: [3], maxCVCLenth: 3, length: [14, 15, 16, 17, 18, 19], @@ -46,7 +46,7 @@ let cardPatterns = [ }, { issuer: "Discover", - pattern: %re("/^(6011|65|64[4-9]|622)/"), + pattern: %re("/^(6011|64[4-9]|65|622126|622[1-9][0-9][0-9]|6229[0-1][0-9]|622925)/"), cvcLength: [3], length: [16], maxCVCLenth: 3, @@ -54,7 +54,7 @@ let cardPatterns = [ }, { issuer: "Mastercard", - pattern: %re("/^5[1-5]/"), + pattern: %re("/^(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[0-1][0-9]|2720|5[1-5])/"), cvcLength: [3], maxCVCLenth: 3, length: [16], @@ -94,7 +94,7 @@ let cardPatterns = [ }, { issuer: "JCB", - pattern: %re("/^35/"), + pattern: %re("/^35(2[89]|[3-8][0-9])/"), cvcLength: [3], maxCVCLenth: 3, length: [16], diff --git a/src/CardUtils.res b/src/CardUtils.res index 3bb719c6f..8a93c3495 100644 --- a/src/CardUtils.res +++ b/src/CardUtils.res @@ -176,8 +176,7 @@ let formatCardNumber = (val, cardType) => { let clearValue = val->clearSpaces let formatedCard = switch cardType { | AMEX => `${clearValue->slice(0, 4)} ${clearValue->slice(4, 10)} ${clearValue->slice(10, 15)}` - | DINERSCLUB => - `${clearValue->slice(0, 4)} ${clearValue->slice(4, 10)} ${clearValue->slice(10, 14)}` + | DINERSCLUB | MASTERCARD | DISCOVER | SODEXO @@ -380,7 +379,10 @@ let getExpiryValidity = cardExpiry => { let valid = if currentYear == year->toInt && month->toInt >= currentMonth && month->toInt <= 12 { true } else if ( - year->toInt > currentYear && year->toInt < 2075 && month->toInt >= 1 && month->toInt <= 12 + year->toInt > currentYear && + year->toInt < Date.getFullYear(Js.Date.fromFloat(Date.now())) + 100 && + month->toInt >= 1 && + month->toInt <= 12 ) { true } else { @@ -454,12 +456,27 @@ let generateFontsLink = (fonts: array) => { ->ignore } } + let maxCardLength = cardBrand => { let obj = getobjFromCardPattern(cardBrand) Array.reduce(obj.length, 0, (acc, val) => max(acc, val)) } +let isCardLengthValid = (cardBrand, cardNumberLength) => { + let obj = getobjFromCardPattern(cardBrand) + Array.includes(obj.length, cardNumberLength) +} + let cardValid = (cardNumber, cardBrand) => { + let clearValueLength = cardNumber->clearSpaces->String.length + if cardBrand == "" && (GlobalVars.isInteg || GlobalVars.isSandbox) { + Utils.checkIsTestCardWildcard(cardNumber) + } else { + isCardLengthValid(cardBrand, clearValueLength) && calculateLuhn(cardNumber) + } +} + +let focusCardValid = (cardNumber, cardBrand) => { let clearValueLength = cardNumber->clearSpaces->String.length if cardBrand == "" && (GlobalVars.isInteg || GlobalVars.isSandbox) { Utils.checkIsTestCardWildcard(cardNumber) @@ -468,6 +485,7 @@ let cardValid = (cardNumber, cardBrand) => { (cardBrand === "Visa" && clearValueLength == 16)) && calculateLuhn(cardNumber) } } + let blurRef = (ref: React.ref>) => { ref.current->Nullable.toOption->Option.forEach(input => input->blur)->ignore } @@ -566,10 +584,10 @@ let setCardValid = (cardnumber, setIsCardValid) => { if cardValid(cardnumber, cardBrand) { setIsCardValid(_ => Some(true)) } else if ( - !cardValid(cardnumber, cardBrand) && cardnumber->String.length == maxCardLength(cardBrand) + !cardValid(cardnumber, cardBrand) && isCardLengthValid(cardBrand, cardnumber->String.length) ) { setIsCardValid(_ => Some(false)) - } else if !(cardnumber->String.length == maxCardLength(cardBrand)) { + } else if !isCardLengthValid(cardBrand, cardnumber->String.length) { setIsCardValid(_ => None) } } diff --git a/src/Payment.res b/src/Payment.res index 19028b56f..253b89391 100644 --- a/src/Payment.res +++ b/src/Payment.res @@ -88,7 +88,7 @@ let make = (~paymentMode, ~integrateError, ~logger) => { let clearValue = card->clearSpaces setCardValid(clearValue, setIsCardValid) if ( - cardValid(clearValue, cardBrand) && + focusCardValid(clearValue, cardBrand) && (PaymentUtils.checkIsCardSupported(clearValue, supportedCardBrands)->Option.getOr(false) || Utils.checkIsTestCardWildcard(clearValue)) ) { From 863f9af7ff09ae9772afec0a50fa210345bee3f3 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 9 Dec 2024 08:55:03 +0000 Subject: [PATCH 02/27] chore(release): 0.105.3 [skip ci] ## [0.105.3](https://github.com/juspay/hyperswitch-web/compare/v0.105.2...v0.105.3) (2024-12-09) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f1362387..6dc6143cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.105.3](https://github.com/juspay/hyperswitch-web/compare/v0.105.2...v0.105.3) (2024-12-09) + ## [0.105.2](https://github.com/juspay/hyperswitch-web/compare/v0.105.1...v0.105.2) (2024-12-05) diff --git a/package-lock.json b/package-lock.json index 8526311c5..b63929c58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.105.2", + "version": "0.105.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.105.2", + "version": "0.105.3", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 87455838e..a37528ce1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.105.2", + "version": "0.105.3", "main": "index.js", "private": true, "dependencies": { From e925e33556531eb7142ee0a7b26cdbcacc920b15 Mon Sep 17 00:00:00 2001 From: Sanskar Atrey Date: Mon, 9 Dec 2024 14:46:14 +0530 Subject: [PATCH 03/27] feat: added cb regex and typo fix (#811) Co-authored-by: Pritish Budhiraja --- src/CardPattern.res | 34 ++++++++++++++++++++++------------ src/CardSchemeComponent.res | 2 +- src/CardUtils.res | 2 +- src/Payment.res | 2 +- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/src/CardPattern.res b/src/CardPattern.res index 1706eeb06..ab814e31f 100644 --- a/src/CardPattern.res +++ b/src/CardPattern.res @@ -3,7 +3,7 @@ type patterns = { pattern: Re.t, cvcLength: array, length: array, - maxCVCLenth: int, + maxCVCLength: int, pincodeRequired: bool, } type card = {details: array} @@ -11,7 +11,7 @@ let defaultCardPattern = { issuer: "", pattern: %re("/^[0-9]/"), cvcLength: [3], - maxCVCLenth: 3, + maxCVCLength: 3, length: [16], pincodeRequired: false, } @@ -23,7 +23,7 @@ let cardPatterns = [ ), cvcLength: [3, 4], length: [12, 13, 14, 15, 16, 17, 18, 19], - maxCVCLenth: 4, + maxCVCLength: 4, pincodeRequired: true, }, { @@ -33,14 +33,14 @@ let cardPatterns = [ ), cvcLength: [3], length: [16], - maxCVCLenth: 3, + maxCVCLength: 3, pincodeRequired: false, }, { issuer: "DinersClub", pattern: %re("/^(36|38|39|30[0-5])/"), cvcLength: [3], - maxCVCLenth: 3, + maxCVCLength: 3, length: [14, 15, 16, 17, 18, 19], pincodeRequired: false, }, @@ -49,14 +49,14 @@ let cardPatterns = [ pattern: %re("/^(6011|64[4-9]|65|622126|622[1-9][0-9][0-9]|6229[0-1][0-9]|622925)/"), cvcLength: [3], length: [16], - maxCVCLenth: 3, + maxCVCLength: 3, pincodeRequired: true, }, { issuer: "Mastercard", pattern: %re("/^(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[0-1][0-9]|2720|5[1-5])/"), cvcLength: [3], - maxCVCLenth: 3, + maxCVCLength: 3, length: [16], pincodeRequired: true, }, @@ -65,7 +65,7 @@ let cardPatterns = [ pattern: %re("/^3[47]/"), cvcLength: [3, 4], length: [14, 15], - maxCVCLenth: 4, + maxCVCLength: 4, pincodeRequired: true, }, { @@ -73,7 +73,17 @@ let cardPatterns = [ pattern: %re("/^4/"), cvcLength: [3], length: [13, 14, 15, 16, 19], - maxCVCLenth: 3, + maxCVCLength: 3, + pincodeRequired: true, + }, + { + issuer: "CartesBancaires", + pattern: %re( + "/^(401(005|006|581)|4021(01|02)|403550|405936|406572|41(3849|4819|50(56|59|62|71|74)|6286|65(37|79)|71[7])|420110|423460|43(47(21|22)|50(48|49|50|51|52)|7875|95(09|11|15|39|98)|96(03|18|19|20|22|72))|4424(48|49|50|51|52|57)|448412|4505(19|60)|45(33|56[6-8]|61|62[^3]|6955|7452|7717|93[02379])|46(099|54(76|77)|6258|6575|98[023])|47(4107|71(73|74|86)|72(65|93)|9619)|48(1091|3622|6519)|49(7|83[5-9]|90(0[1-6]|1[0-6]|2[0-3]|3[0-3]|4[0-3]|5[0-2]|68|9[256789]))|5075(89|90|93|94|97)|51(0726|3([0-7]|8[56]|9(00|38))|5214|62(07|36)|72(22|43)|73(65|66)|7502|7647|8101|9920)|52(0993|1662|3718|7429|9227|93(13|14|31)|94(14|21|30|40|47|55|56|[6-9])|9542)|53(0901|10(28|30)|1195|23(4[4-7])|2459|25(09|34|54|56)|3801|41(02|05|11)|50(29|66)|5324|61(07|15)|71(06|12)|8011)|54(2848|5157|9538|98(5[89]))|55(39(79|93)|42(05|60)|4965|7008|88(67|82)|89(29|4[23])|9618|98(09|10))|56(0408|12(0[2-6]|4[134]|5[04678]))|58(17(0[0-7]|15|2[14]|3[16789]|4[0-9]|5[016]|6[269]|7[3789]|8[0-7]|9[017])|55(0[2-5]|7[7-9]|8[0-2])))/" + ), + cvcLength: [3], + length: [16, 17, 18, 19], + maxCVCLength: 3, pincodeRequired: true, }, { @@ -81,14 +91,14 @@ let cardPatterns = [ pattern: %re("/^(637513)/"), cvcLength: [3], length: [16], - maxCVCLenth: 3, + maxCVCLength: 3, pincodeRequired: false, }, { issuer: "BAJAJ", pattern: %re("/^(203040)/"), cvcLength: [3], - maxCVCLenth: 3, + maxCVCLength: 3, length: [16], pincodeRequired: true, }, @@ -96,7 +106,7 @@ let cardPatterns = [ issuer: "JCB", pattern: %re("/^35(2[89]|[3-8][0-9])/"), cvcLength: [3], - maxCVCLenth: 3, + maxCVCLength: 3, length: [16], pincodeRequired: false, }, diff --git a/src/CardSchemeComponent.res b/src/CardSchemeComponent.res index dee03adf6..1d6621711 100644 --- a/src/CardSchemeComponent.res +++ b/src/CardSchemeComponent.res @@ -31,7 +31,7 @@ let make = (~cardNumber, ~paymentType, ~cardBrand, ~setCardBrand) => { let enabledCardSchemes = paymentMethodListValue->PaymentUtils.getSupportedCardBrands->Option.getOr([]) - let matchedCardSchemes = cardNumber->CardUtils.getAllMatchedCardSchemes + let matchedCardSchemes = cardNumber->CardUtils.clearSpaces->CardUtils.getAllMatchedCardSchemes let eligibleCardSchemes = CardUtils.getEligibleCoBadgedCardSchemes( ~matchedCardSchemes, diff --git a/src/CardUtils.res b/src/CardUtils.res index 8a93c3495..3301b78da 100644 --- a/src/CardUtils.res +++ b/src/CardUtils.res @@ -156,7 +156,7 @@ let getStrFromIndex = (arr: array, index) => { let formatCVCNumber = (val, cardType) => { let clearValue = val->clearSpaces let obj = getobjFromCardPattern(cardType) - clearValue->slice(0, obj.maxCVCLenth) + clearValue->slice(0, obj.maxCVCLength) } let getCurrentMonthAndYear = (dateTimeIsoString: string) => { diff --git a/src/Payment.res b/src/Payment.res index 253b89391..befaab786 100644 --- a/src/Payment.res +++ b/src/Payment.res @@ -71,7 +71,7 @@ let make = (~paymentMode, ~integrateError, ~logger) => { React.useEffect(() => { let obj = getobjFromCardPattern(cardBrand) - let cvcLength = obj.maxCVCLenth + let cvcLength = obj.maxCVCLength if ( cvcNumberInRange(cvcNumber, cardBrand)->Array.includes(true) && cvcNumber->String.length == cvcLength From c49f278d7aef730e6687538d2d5f5830bff39484 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 9 Dec 2024 09:18:13 +0000 Subject: [PATCH 04/27] chore(release): 0.106.0 [skip ci] # [0.106.0](https://github.com/juspay/hyperswitch-web/compare/v0.105.3...v0.106.0) (2024-12-09) ### Features * added cb regex and typo fix ([#811](https://github.com/juspay/hyperswitch-web/issues/811)) ([e925e33](https://github.com/juspay/hyperswitch-web/commit/e925e33556531eb7142ee0a7b26cdbcacc920b15)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dc6143cb..4502e8862 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [0.106.0](https://github.com/juspay/hyperswitch-web/compare/v0.105.3...v0.106.0) (2024-12-09) + + +### Features + +* added cb regex and typo fix ([#811](https://github.com/juspay/hyperswitch-web/issues/811)) ([e925e33](https://github.com/juspay/hyperswitch-web/commit/e925e33556531eb7142ee0a7b26cdbcacc920b15)) + ## [0.105.3](https://github.com/juspay/hyperswitch-web/compare/v0.105.2...v0.105.3) (2024-12-09) ## [0.105.2](https://github.com/juspay/hyperswitch-web/compare/v0.105.1...v0.105.2) (2024-12-05) diff --git a/package-lock.json b/package-lock.json index b63929c58..ff92d6807 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.105.3", + "version": "0.106.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.105.3", + "version": "0.106.0", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index a37528ce1..23ae6c12e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.105.3", + "version": "0.106.0", "main": "index.js", "private": true, "dependencies": { From fd15e54ffd9d1bb4445a78567242d3ebc5a25b90 Mon Sep 17 00:00:00 2001 From: aritro2002 Date: Mon, 9 Dec 2024 18:25:27 +0530 Subject: [PATCH 05/27] fix: card validation focus check (#827) --- src/CardUtils.res | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/CardUtils.res b/src/CardUtils.res index 3301b78da..fb4c13e6a 100644 --- a/src/CardUtils.res +++ b/src/CardUtils.res @@ -581,13 +581,12 @@ let swapCardOption = (cardOpts: array, dropOpts: array, selected let setCardValid = (cardnumber, setIsCardValid) => { let cardBrand = getCardBrand(cardnumber) + let isCardMaxLength = cardnumber->String.length == maxCardLength(cardBrand) if cardValid(cardnumber, cardBrand) { setIsCardValid(_ => Some(true)) - } else if ( - !cardValid(cardnumber, cardBrand) && isCardLengthValid(cardBrand, cardnumber->String.length) - ) { + } else if !cardValid(cardnumber, cardBrand) && isCardMaxLength { setIsCardValid(_ => Some(false)) - } else if !isCardLengthValid(cardBrand, cardnumber->String.length) { + } else if !isCardMaxLength { setIsCardValid(_ => None) } } From 8545f776997f28dc5891a1b4a16ae9bed7cafd56 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 9 Dec 2024 12:57:23 +0000 Subject: [PATCH 06/27] chore(release): 0.106.1 [skip ci] ## [0.106.1](https://github.com/juspay/hyperswitch-web/compare/v0.106.0...v0.106.1) (2024-12-09) ### Bug Fixes * card validation focus check ([#827](https://github.com/juspay/hyperswitch-web/issues/827)) ([fd15e54](https://github.com/juspay/hyperswitch-web/commit/fd15e54ffd9d1bb4445a78567242d3ebc5a25b90)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4502e8862..fbf135a7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.106.1](https://github.com/juspay/hyperswitch-web/compare/v0.106.0...v0.106.1) (2024-12-09) + + +### Bug Fixes + +* card validation focus check ([#827](https://github.com/juspay/hyperswitch-web/issues/827)) ([fd15e54](https://github.com/juspay/hyperswitch-web/commit/fd15e54ffd9d1bb4445a78567242d3ebc5a25b90)) + # [0.106.0](https://github.com/juspay/hyperswitch-web/compare/v0.105.3...v0.106.0) (2024-12-09) diff --git a/package-lock.json b/package-lock.json index ff92d6807..fde74334c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.106.0", + "version": "0.106.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.106.0", + "version": "0.106.1", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 23ae6c12e..694f40dc9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.106.0", + "version": "0.106.1", "main": "index.js", "private": true, "dependencies": { From d07622bf586c140092331688172da316606fc5a6 Mon Sep 17 00:00:00 2001 From: aritro2002 Date: Tue, 10 Dec 2024 13:56:55 +0530 Subject: [PATCH 07/27] chore: emitting expiry via saved cards screen (#828) --- src/CardUtils.res | 3 +++ src/Components/SavedCardItem.res | 19 +++++++++++++++---- src/Payment.res | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/CardUtils.res b/src/CardUtils.res index fb4c13e6a..0ac6a45ec 100644 --- a/src/CardUtils.res +++ b/src/CardUtils.res @@ -701,3 +701,6 @@ let getCardBrandInvalidError = (~cardNumber, ~localeString: LocaleStringTypes.lo | cardBrandValue => localeString.cardBrandConfiguredErrorText(cardBrandValue) } } + +let emitExpiryDate = formattedExpiry => + Utils.messageParentWindow([("expiryDate", formattedExpiry->JSON.Encode.string)]) diff --git a/src/Components/SavedCardItem.res b/src/Components/SavedCardItem.res index ee6f5eabe..7cd8d3f36 100644 --- a/src/Components/SavedCardItem.res +++ b/src/Components/SavedCardItem.res @@ -72,16 +72,27 @@ let make = ( | None => () } } - React.useEffect(() => { - isActive ? focusCVC() : () - None - }, [isActive]) let isCard = paymentItem.paymentMethod === "card" let isRenderCvv = isCard && paymentItem.requiresCvv let expiryMonth = paymentItem.card.expiryMonth let expiryYear = paymentItem.card.expiryYear + React.useEffect(() => { + open CardUtils + + if isActive { + // * Focus CVC + focusCVC() + + // * Sending card expiry to handle cases where the card expires before the use date. + `${expiryMonth}${String.substring(~start=2, ~end=4, expiryYear)}` + ->formatCardExpiryNumber + ->emitExpiryDate + } + None + }, [isActive]) + let expiryDate = Date.fromString(`${expiryYear}-${expiryMonth}`) expiryDate->Date.setMonth(expiryDate->Date.getMonth + 1) let currentDate = Date.make() diff --git a/src/Payment.res b/src/Payment.res index befaab786..9eee90fdc 100644 --- a/src/Payment.res +++ b/src/Payment.res @@ -113,7 +113,7 @@ let make = (~paymentMode, ~integrateError, ~logger) => { handleInputFocus(~currentRef=expiryRef, ~destinationRef=cvcRef) // * Sending card expiry to handle cases where the card expires before the use date. - Utils.messageParentWindow([("expiryDate", formattedExpiry->JSON.Encode.string)]) + emitExpiryDate(formattedExpiry) } setExpiryValid(formattedExpiry, setIsExpiryValid) setCardExpiry(_ => formattedExpiry) From 61d1c2ce1bb681d87293c96c21b18b7670b6c34e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Tue, 10 Dec 2024 08:28:45 +0000 Subject: [PATCH 08/27] chore(release): 0.106.2 [skip ci] ## [0.106.2](https://github.com/juspay/hyperswitch-web/compare/v0.106.1...v0.106.2) (2024-12-10) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbf135a7f..1c4d32683 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.106.2](https://github.com/juspay/hyperswitch-web/compare/v0.106.1...v0.106.2) (2024-12-10) + ## [0.106.1](https://github.com/juspay/hyperswitch-web/compare/v0.106.0...v0.106.1) (2024-12-09) diff --git a/package-lock.json b/package-lock.json index fde74334c..539c4d435 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.106.1", + "version": "0.106.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.106.1", + "version": "0.106.2", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 694f40dc9..b4dd4415e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.106.1", + "version": "0.106.2", "main": "index.js", "private": true, "dependencies": { From ea411f257acb0e7f3596047d74267abbf740ef93 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja Date: Wed, 11 Dec 2024 13:01:36 +0530 Subject: [PATCH 09/27] chore: add env based var via jenkins (#829) --- .env | 1 + README.md | 4 ++-- package.json | 8 ++++---- src/Payments/CardPayment.res | 2 ++ webpack.common.js | 22 +++++++++++----------- webpack.dev.js | 4 ++-- 6 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.env b/.env index 29dda11a9..d490ee35f 100644 --- a/.env +++ b/.env @@ -1,2 +1,3 @@ ENV_BACKEND_URL="" ENV_LOGGING_URL="" +SDK_ENV="local" \ No newline at end of file diff --git a/README.md b/README.md index 4a3e2f8c1..f1ea61b9f 100644 --- a/README.md +++ b/README.md @@ -177,12 +177,12 @@ In the [`webpack.common.js`](./webpack.common.js) file, you would have to enable ```javascipt let logEndpoint = - sdkEnv === "prod" + SDK_ENV === "prod" ? "" : ""; // Set this to true to enable logging -let enableLogging = true; +let ENABLE_LOGGING = true; // Choose from DEBUG, INFO, WARNING, ERROR, SILENT let loggingLevel = "DEBUG"; diff --git a/package.json b/package.json index b4dd4415e..df036abd9 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,10 @@ }, "scripts": { "build": "webpack --config webpack.common.js", - "build:integ": "cross-env sdkEnv=integ enableLogging=false webpack --config webpack.common.js", + "build:integ": "cross-env webpack --config webpack.common.js", "build:playground": "npm run setup:playground && npm run build", - "build:prod": "cross-env sdkEnv=prod enableLogging=true webpack --config webpack.common.js", - "build:sandbox": "cross-env sdkEnv=sandbox enableLogging=true webpack --config webpack.common.js", + "build:prod": "cross-env webpack --config webpack.common.js", + "build:sandbox": "cross-env webpack --config webpack.common.js", "deploy-to-s3": "node ./scripts/pushToS3.js", "postinstall": "cd Hyperswitch-React-Demo-App && npm i", "prepare": "husky install", @@ -29,7 +29,7 @@ "re:format": "rescript format -all", "re:start": "rescript -w", "setup:playground": "npm run postinstall && cd Hyperswitch-React-Demo-App && node promptScript.js", - "start": "cross-env sdkEnv=local enableLogging=false webpack serve --config webpack.dev.js", + "start": "cross-env webpack serve --config webpack.dev.js", "start:playground": "npm run setup:playground && npm run start", "test": "cd cypress-tests && npm run cypress:run", "test:hooks": "npx eslint src/" diff --git a/src/Payments/CardPayment.res b/src/Payments/CardPayment.res index 2758da9ee..d8da64cd5 100644 --- a/src/Payments/CardPayment.res +++ b/src/Payments/CardPayment.res @@ -125,6 +125,8 @@ let make = ( ~isGuestCustomer, ) + Console.log2(">>>> Logs Debug >>>>", (GlobalVars.enableLogging, GlobalVars.logEndpoint)) + let submitCallback = React.useCallback((ev: Window.event) => { let json = ev.data->safeParse let confirm = json->getDictFromJson->ConfirmType.itemToObjMapper diff --git a/webpack.common.js b/webpack.common.js index 18a9015f9..7648cc0c6 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -13,8 +13,8 @@ const AddReactDisplayNamePlugin = require("babel-plugin-add-react-displayname"); const getEnvVariable = (variable, defaultValue) => process.env[variable] ?? defaultValue; -const sdkEnv = getEnvVariable("sdkEnv", "local"); -const enableLogging = getEnvVariable("enableLogging", "false") === "true"; +const SDK_ENV = getEnvVariable("SDK_ENV", "local"); +const ENABLE_LOGGING = getEnvVariable("ENABLE_LOGGING", "false") === "true"; const envSdkUrl = getEnvVariable("ENV_SDK_URL", ""); const envBackendUrl = getEnvVariable("ENV_BACKEND_URL", ""); const envLoggingUrl = getEnvVariable("ENV_LOGGING_URL", ""); @@ -23,7 +23,7 @@ const repoVersion = require("./package.json").version; const majorVersion = "v" + repoVersion.split(".")[0]; const repoName = require("./package.json").name; const repoPublicPath = - sdkEnv === "local" ? "" : `/web/${repoVersion}/${majorVersion}`; + SDK_ENV === "local" ? "" : `/web/${repoVersion}/${majorVersion}`; const getSdkUrl = (env, customUrl) => { if (customUrl) return customUrl; @@ -36,9 +36,9 @@ const getSdkUrl = (env, customUrl) => { return urls[env] || urls.local; }; -const sdkUrl = getSdkUrl(sdkEnv, envSdkUrl); +const sdkUrl = getSdkUrl(SDK_ENV, envSdkUrl); const getEnvironmentDomain = (prodDomain, integDomain, defaultDomain) => { - switch (sdkEnv) { + switch (SDK_ENV) { case "prod": return prodDomain; case "integ": @@ -82,7 +82,7 @@ module.exports = (publicPath = "auto") => { logEndpoint: JSON.stringify(logEndpoint), sentryDSN: JSON.stringify(process.env.SENTRY_DSN), sentryScriptUrl: JSON.stringify(process.env.SENTRY_SCRIPT_URL), - enableLogging: enableLogging, + enableLogging: ENABLE_LOGGING, loggingLevel: JSON.stringify(loggingLevel), maxLogsPushedPerEventName: JSON.stringify(maxLogsPushedPerEventName), }), @@ -129,18 +129,18 @@ module.exports = (publicPath = "auto") => { } return { - mode: sdkEnv === "local" ? "development" : "production", - devtool: sdkEnv === "local" ? "eval-source-map" : "source-map", + mode: SDK_ENV === "local" ? "development" : "production", + devtool: SDK_ENV === "local" ? "eval-source-map" : "source-map", output: { path: - sdkEnv && sdkEnv !== "local" - ? path.resolve(__dirname, "dist", sdkEnv) + SDK_ENV && SDK_ENV !== "local" + ? path.resolve(__dirname, "dist", SDK_ENV) : path.resolve(__dirname, "dist"), clean: true, publicPath: `${repoPublicPath}/`, }, optimization: - sdkEnv === "local" + SDK_ENV === "local" ? {} : { sideEffects: true, diff --git a/webpack.dev.js b/webpack.dev.js index 95ea97ad8..d878120c4 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -3,7 +3,7 @@ require("dotenv").config(); const { merge } = require("webpack-merge"); const common = require("./webpack.common.js"); -const sdkEnv = process.env.sdkEnv ?? "local"; +const SDK_ENV = process.env.SDK_ENV ?? "local"; const endpointMap = { prod: "https://api.hyperswitch.io/payments", @@ -12,7 +12,7 @@ const endpointMap = { local: "https://sandbox.hyperswitch.io/payments", // Default or local environment endpoint }; -const backendEndPoint = endpointMap[sdkEnv] || endpointMap.local; +const backendEndPoint = endpointMap[SDK_ENV] || endpointMap.local; const devServer = { static: { From d35fe504cd29a91e8493b9712603e47ea39e059c Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 11 Dec 2024 07:33:40 +0000 Subject: [PATCH 10/27] chore(release): 0.106.3 [skip ci] ## [0.106.3](https://github.com/juspay/hyperswitch-web/compare/v0.106.2...v0.106.3) (2024-12-11) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c4d32683..a841fce59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.106.3](https://github.com/juspay/hyperswitch-web/compare/v0.106.2...v0.106.3) (2024-12-11) + ## [0.106.2](https://github.com/juspay/hyperswitch-web/compare/v0.106.1...v0.106.2) (2024-12-10) ## [0.106.1](https://github.com/juspay/hyperswitch-web/compare/v0.106.0...v0.106.1) (2024-12-09) diff --git a/package-lock.json b/package-lock.json index 539c4d435..77b45c4d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.106.2", + "version": "0.106.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.106.2", + "version": "0.106.3", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index df036abd9..27d6c6d16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.106.2", + "version": "0.106.3", "main": "index.js", "private": true, "dependencies": { From 3feb53187402cd4bb19c419d8947d891e221615b Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja Date: Wed, 11 Dec 2024 13:10:23 +0530 Subject: [PATCH 11/27] chore: add enablelogging via env (#830) --- .env | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.env b/.env index d490ee35f..36b6d252d 100644 --- a/.env +++ b/.env @@ -1,3 +1,4 @@ ENV_BACKEND_URL="" ENV_LOGGING_URL="" -SDK_ENV="local" \ No newline at end of file +SDK_ENV="local" +ENABLE_LOGGING="false" \ No newline at end of file From f9f221e801c3769f79cddfd8814d311ce2d0f44a Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 11 Dec 2024 07:42:10 +0000 Subject: [PATCH 12/27] chore(release): 0.106.4 [skip ci] ## [0.106.4](https://github.com/juspay/hyperswitch-web/compare/v0.106.3...v0.106.4) (2024-12-11) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a841fce59..a7a0cf93d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.106.4](https://github.com/juspay/hyperswitch-web/compare/v0.106.3...v0.106.4) (2024-12-11) + ## [0.106.3](https://github.com/juspay/hyperswitch-web/compare/v0.106.2...v0.106.3) (2024-12-11) ## [0.106.2](https://github.com/juspay/hyperswitch-web/compare/v0.106.1...v0.106.2) (2024-12-10) diff --git a/package-lock.json b/package-lock.json index 77b45c4d3..c26a7e2e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.106.3", + "version": "0.106.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.106.3", + "version": "0.106.4", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 27d6c6d16..922b05e1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.106.3", + "version": "0.106.4", "main": "index.js", "private": true, "dependencies": { From 769f84517e814896e63d18fdd5114c836ecd21fb Mon Sep 17 00:00:00 2001 From: Kashif Date: Wed, 11 Dec 2024 14:26:09 +0530 Subject: [PATCH 13/27] refactor(payments): add card_holder_name to request only if the value is present (#832) Co-authored-by: Pritish Budhiraja --- src/Payment.res | 4 ++-- src/Payments/CardPayment.res | 2 +- src/Types/PaymentType.res | 2 +- src/Utilities/PaymentBody.res | 7 +++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Payment.res b/src/Payment.res index 9eee90fdc..a0aae0b9d 100644 --- a/src/Payment.res +++ b/src/Payment.res @@ -241,7 +241,7 @@ let make = (~paymentMode, ~integrateError, ~logger) => { ~cardNumber, ~month, ~year, - ~cardHolderName="", + ~cardHolderName=None, ~cvcNumber, ~cardBrand=cardNetwork, ) @@ -252,7 +252,7 @@ let make = (~paymentMode, ~integrateError, ~logger) => { ~cardNumber, ~month, ~year, - ~cardHolderName="", + ~cardHolderName=None, ~cvcNumber=localCvcNumber, ~cardBrand=cardNetwork, ) diff --git a/src/Payments/CardPayment.res b/src/Payments/CardPayment.res index d8da64cd5..a54fb51bd 100644 --- a/src/Payments/CardPayment.res +++ b/src/Payments/CardPayment.res @@ -144,7 +144,7 @@ let make = ( ~cardNumber, ~month, ~year, - ~cardHolderName="", + ~cardHolderName=None, ~cvcNumber, ~cardBrand=cardNetwork, ~nickname=nickname.value, diff --git a/src/Types/PaymentType.res b/src/Types/PaymentType.res index 346efa081..ac0e83994 100644 --- a/src/Types/PaymentType.res +++ b/src/Types/PaymentType.res @@ -863,7 +863,7 @@ let getCardDetails = (dict, str) => { expiryMonth: getString(json, "expiry_month", ""), expiryYear: getString(json, "expiry_year", ""), cardToken: getString(json, "card_token", ""), - cardHolderName: Some(getString(json, "card_holder_name", "")), + cardHolderName: getOptionString(json, "card_holder_name"), nickname: getString(json, "nick_name", ""), } }) diff --git a/src/Utilities/PaymentBody.res b/src/Utilities/PaymentBody.res index 9b6a9aaab..e5c59717c 100644 --- a/src/Utilities/PaymentBody.res +++ b/src/Utilities/PaymentBody.res @@ -35,7 +35,7 @@ let cardPaymentBody = ( ~cardNumber, ~month, ~year, - ~cardHolderName, + ~cardHolderName=None, ~cvcNumber, ~cardBrand, ~nickname="", @@ -44,11 +44,14 @@ let cardPaymentBody = ( ("card_number", cardNumber->CardUtils.clearSpaces->JSON.Encode.string), ("card_exp_month", month->JSON.Encode.string), ("card_exp_year", year->JSON.Encode.string), - ("card_holder_name", cardHolderName->JSON.Encode.string), ("card_cvc", cvcNumber->JSON.Encode.string), ("card_issuer", ""->JSON.Encode.string), ] + cardHolderName + ->Option.map(name => cardBody->Array.push(("card_holder_name", name->JSON.Encode.string))->ignore) + ->ignore + if nickname != "" { cardBody->Array.push(("nick_name", nickname->JSON.Encode.string))->ignore } From c1bacdc304e8f028e80d90f7211fd08733b5a9b6 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 11 Dec 2024 08:57:53 +0000 Subject: [PATCH 14/27] chore(release): 0.106.5 [skip ci] ## [0.106.5](https://github.com/juspay/hyperswitch-web/compare/v0.106.4...v0.106.5) (2024-12-11) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7a0cf93d..365437219 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.106.5](https://github.com/juspay/hyperswitch-web/compare/v0.106.4...v0.106.5) (2024-12-11) + ## [0.106.4](https://github.com/juspay/hyperswitch-web/compare/v0.106.3...v0.106.4) (2024-12-11) ## [0.106.3](https://github.com/juspay/hyperswitch-web/compare/v0.106.2...v0.106.3) (2024-12-11) diff --git a/package-lock.json b/package-lock.json index c26a7e2e8..8d6bece6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.106.4", + "version": "0.106.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.106.4", + "version": "0.106.5", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 922b05e1f..19c126620 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.106.4", + "version": "0.106.5", "main": "index.js", "private": true, "dependencies": { From 19074c37eeb3953ab5e9bcc8915b1efd8bfa493b Mon Sep 17 00:00:00 2001 From: Sanskar Atrey Date: Wed, 11 Dec 2024 14:41:41 +0530 Subject: [PATCH 15/27] refactor: cobaged ux enhancement and added icon for CB (#834) Co-authored-by: aritro.ghosh Co-authored-by: Pritish Budhiraja --- public/icons/orca.svg | 1 + src/CardSchemeComponent.res | 2 +- src/CardUtils.res | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/icons/orca.svg b/public/icons/orca.svg index dcdab264b..933043688 100644 --- a/public/icons/orca.svg +++ b/public/icons/orca.svg @@ -760,6 +760,7 @@ License) + {
cardBrandIcon - + CardUtils.clearSpaces->String.length >= 16}>
diff --git a/src/CardUtils.res b/src/CardUtils.res index 0ac6a45ec..682e845cf 100644 --- a/src/CardUtils.res +++ b/src/CardUtils.res @@ -347,7 +347,7 @@ let getCardBrandIcon = (cardType, paymentType) => { | SODEXO => | RUPAY => | JCB => - | CARTESBANCAIRES => + | CARTESBANCAIRES => | UNIONPAY => | INTERAC => | NOTFOUND => From db64db9b92de628f719724bc4b6b078904ad308b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 11 Dec 2024 09:13:40 +0000 Subject: [PATCH 16/27] chore(release): 0.106.6 [skip ci] ## [0.106.6](https://github.com/juspay/hyperswitch-web/compare/v0.106.5...v0.106.6) (2024-12-11) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 365437219..d81845486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.106.6](https://github.com/juspay/hyperswitch-web/compare/v0.106.5...v0.106.6) (2024-12-11) + ## [0.106.5](https://github.com/juspay/hyperswitch-web/compare/v0.106.4...v0.106.5) (2024-12-11) ## [0.106.4](https://github.com/juspay/hyperswitch-web/compare/v0.106.3...v0.106.4) (2024-12-11) diff --git a/package-lock.json b/package-lock.json index 8d6bece6a..a5a9211a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.106.5", + "version": "0.106.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.106.5", + "version": "0.106.6", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 19c126620..0e700b009 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.106.5", + "version": "0.106.6", "main": "index.js", "private": true, "dependencies": { From 7977082ddfb0c7f5b3d0647c68daa9d1597a128a Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja Date: Wed, 11 Dec 2024 14:47:11 +0530 Subject: [PATCH 17/27] chore: added sdk env via package.json --- .env | 1 - README.md | 2 +- package.json | 8 ++++---- webpack.common.js | 18 +++++++++--------- webpack.dev.js | 4 ++-- 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.env b/.env index 36b6d252d..92e6a4735 100644 --- a/.env +++ b/.env @@ -1,4 +1,3 @@ ENV_BACKEND_URL="" ENV_LOGGING_URL="" -SDK_ENV="local" ENABLE_LOGGING="false" \ No newline at end of file diff --git a/README.md b/README.md index f1ea61b9f..4b565c7e9 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ In the [`webpack.common.js`](./webpack.common.js) file, you would have to enable ```javascipt let logEndpoint = - SDK_ENV === "prod" + sdkEnv === "prod" ? "" : ""; diff --git a/package.json b/package.json index 0e700b009..dab7c052b 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,10 @@ }, "scripts": { "build": "webpack --config webpack.common.js", - "build:integ": "cross-env webpack --config webpack.common.js", + "build:integ": "cross-env sdkEnv=integ webpack --config webpack.common.js", "build:playground": "npm run setup:playground && npm run build", - "build:prod": "cross-env webpack --config webpack.common.js", - "build:sandbox": "cross-env webpack --config webpack.common.js", + "build:prod": "cross-env sdkEnv=prod webpack --config webpack.common.js", + "build:sandbox": "cross-env sdkEnv=sandbox webpack --config webpack.common.js", "deploy-to-s3": "node ./scripts/pushToS3.js", "postinstall": "cd Hyperswitch-React-Demo-App && npm i", "prepare": "husky install", @@ -29,7 +29,7 @@ "re:format": "rescript format -all", "re:start": "rescript -w", "setup:playground": "npm run postinstall && cd Hyperswitch-React-Demo-App && node promptScript.js", - "start": "cross-env webpack serve --config webpack.dev.js", + "start": "cross-env sdkEnv=local webpack serve --config webpack.dev.js", "start:playground": "npm run setup:playground && npm run start", "test": "cd cypress-tests && npm run cypress:run", "test:hooks": "npx eslint src/" diff --git a/webpack.common.js b/webpack.common.js index 7648cc0c6..7fdb56086 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -13,7 +13,7 @@ const AddReactDisplayNamePlugin = require("babel-plugin-add-react-displayname"); const getEnvVariable = (variable, defaultValue) => process.env[variable] ?? defaultValue; -const SDK_ENV = getEnvVariable("SDK_ENV", "local"); +const sdkEnv = getEnvVariable("sdkEnv", "local"); const ENABLE_LOGGING = getEnvVariable("ENABLE_LOGGING", "false") === "true"; const envSdkUrl = getEnvVariable("ENV_SDK_URL", ""); const envBackendUrl = getEnvVariable("ENV_BACKEND_URL", ""); @@ -23,7 +23,7 @@ const repoVersion = require("./package.json").version; const majorVersion = "v" + repoVersion.split(".")[0]; const repoName = require("./package.json").name; const repoPublicPath = - SDK_ENV === "local" ? "" : `/web/${repoVersion}/${majorVersion}`; + sdkEnv === "local" ? "" : `/web/${repoVersion}/${majorVersion}`; const getSdkUrl = (env, customUrl) => { if (customUrl) return customUrl; @@ -36,9 +36,9 @@ const getSdkUrl = (env, customUrl) => { return urls[env] || urls.local; }; -const sdkUrl = getSdkUrl(SDK_ENV, envSdkUrl); +const sdkUrl = getSdkUrl(sdkEnv, envSdkUrl); const getEnvironmentDomain = (prodDomain, integDomain, defaultDomain) => { - switch (SDK_ENV) { + switch (sdkEnv) { case "prod": return prodDomain; case "integ": @@ -129,18 +129,18 @@ module.exports = (publicPath = "auto") => { } return { - mode: SDK_ENV === "local" ? "development" : "production", - devtool: SDK_ENV === "local" ? "eval-source-map" : "source-map", + mode: sdkEnv === "local" ? "development" : "production", + devtool: sdkEnv === "local" ? "eval-source-map" : "source-map", output: { path: - SDK_ENV && SDK_ENV !== "local" - ? path.resolve(__dirname, "dist", SDK_ENV) + sdkEnv && sdkEnv !== "local" + ? path.resolve(__dirname, "dist", sdkEnv) : path.resolve(__dirname, "dist"), clean: true, publicPath: `${repoPublicPath}/`, }, optimization: - SDK_ENV === "local" + sdkEnv === "local" ? {} : { sideEffects: true, diff --git a/webpack.dev.js b/webpack.dev.js index d878120c4..95ea97ad8 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -3,7 +3,7 @@ require("dotenv").config(); const { merge } = require("webpack-merge"); const common = require("./webpack.common.js"); -const SDK_ENV = process.env.SDK_ENV ?? "local"; +const sdkEnv = process.env.sdkEnv ?? "local"; const endpointMap = { prod: "https://api.hyperswitch.io/payments", @@ -12,7 +12,7 @@ const endpointMap = { local: "https://sandbox.hyperswitch.io/payments", // Default or local environment endpoint }; -const backendEndPoint = endpointMap[SDK_ENV] || endpointMap.local; +const backendEndPoint = endpointMap[sdkEnv] || endpointMap.local; const devServer = { static: { From a571a2a01ad65b4b59bd48cf93a81a058a72234a Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 11 Dec 2024 09:19:20 +0000 Subject: [PATCH 18/27] chore(release): 0.106.7 [skip ci] ## [0.106.7](https://github.com/juspay/hyperswitch-web/compare/v0.106.6...v0.106.7) (2024-12-11) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d81845486..116c82f48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.106.7](https://github.com/juspay/hyperswitch-web/compare/v0.106.6...v0.106.7) (2024-12-11) + ## [0.106.6](https://github.com/juspay/hyperswitch-web/compare/v0.106.5...v0.106.6) (2024-12-11) ## [0.106.5](https://github.com/juspay/hyperswitch-web/compare/v0.106.4...v0.106.5) (2024-12-11) diff --git a/package-lock.json b/package-lock.json index a5a9211a9..be12bed5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.106.6", + "version": "0.106.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.106.6", + "version": "0.106.7", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index dab7c052b..791fd02e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.106.6", + "version": "0.106.7", "main": "index.js", "private": true, "dependencies": { From 5fa9c42af9051dfc2a43aaaedf51aded5a98bfc8 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja Date: Wed, 11 Dec 2024 16:08:50 +0530 Subject: [PATCH 19/27] chore: process env console --- webpack.common.js | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/webpack.common.js b/webpack.common.js index 7fdb56086..51759491f 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -36,6 +36,8 @@ const getSdkUrl = (env, customUrl) => { return urls[env] || urls.local; }; +console.log("env", process.env); + const sdkUrl = getSdkUrl(sdkEnv, envSdkUrl); const getEnvironmentDomain = (prodDomain, integDomain, defaultDomain) => { switch (sdkEnv) { @@ -67,25 +69,28 @@ module.exports = (publicPath = "auto") => { app: "./index.js", HyperLoader: "./src/hyper-loader/HyperLoader.bs.js", }; + let definePluginValues = { + repoName: JSON.stringify(repoName), + repoVersion: JSON.stringify(repoVersion), + publicPath: JSON.stringify(repoPublicPath), + sdkUrl: JSON.stringify(sdkUrl), + backendEndPoint: JSON.stringify(backendEndPoint), + confirmEndPoint: JSON.stringify(confirmEndPoint), + logEndpoint: JSON.stringify(logEndpoint), + sentryDSN: JSON.stringify(process.env.SENTRY_DSN), + sentryScriptUrl: JSON.stringify(process.env.SENTRY_SCRIPT_URL), + enableLogging: ENABLE_LOGGING, + loggingLevel: JSON.stringify(loggingLevel), + maxLogsPushedPerEventName: JSON.stringify(maxLogsPushedPerEventName), + }; + console.log("definePluginValues", definePluginValues); + const plugins = [ new MiniCssExtractPlugin(), new CopyPlugin({ patterns: [{ from: "public" }], }), - new webpack.DefinePlugin({ - repoName: JSON.stringify(repoName), - repoVersion: JSON.stringify(repoVersion), - publicPath: JSON.stringify(repoPublicPath), - sdkUrl: JSON.stringify(sdkUrl), - backendEndPoint: JSON.stringify(backendEndPoint), - confirmEndPoint: JSON.stringify(confirmEndPoint), - logEndpoint: JSON.stringify(logEndpoint), - sentryDSN: JSON.stringify(process.env.SENTRY_DSN), - sentryScriptUrl: JSON.stringify(process.env.SENTRY_SCRIPT_URL), - enableLogging: ENABLE_LOGGING, - loggingLevel: JSON.stringify(loggingLevel), - maxLogsPushedPerEventName: JSON.stringify(maxLogsPushedPerEventName), - }), + new webpack.DefinePlugin(definePluginValues), new HtmlWebpackPlugin({ inject: false, template: "./public/build.html", From 93ba53a5accc4c5367d01212ab5ad8d0d0007528 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 11 Dec 2024 10:40:57 +0000 Subject: [PATCH 20/27] chore(release): 0.106.8 [skip ci] ## [0.106.8](https://github.com/juspay/hyperswitch-web/compare/v0.106.7...v0.106.8) (2024-12-11) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 116c82f48..33bc1208d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.106.8](https://github.com/juspay/hyperswitch-web/compare/v0.106.7...v0.106.8) (2024-12-11) + ## [0.106.7](https://github.com/juspay/hyperswitch-web/compare/v0.106.6...v0.106.7) (2024-12-11) ## [0.106.6](https://github.com/juspay/hyperswitch-web/compare/v0.106.5...v0.106.6) (2024-12-11) diff --git a/package-lock.json b/package-lock.json index be12bed5b..4848a68a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.106.7", + "version": "0.106.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.106.7", + "version": "0.106.8", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 791fd02e5..a96b02957 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.106.7", + "version": "0.106.8", "main": "index.js", "private": true, "dependencies": { From 131dfb07860c8d73e5f0f53fab9ddc27014a29e8 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja Date: Wed, 11 Dec 2024 16:57:44 +0530 Subject: [PATCH 21/27] chore: removed debugging logs --- src/Payments/CardPayment.res | 2 -- webpack.common.js | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Payments/CardPayment.res b/src/Payments/CardPayment.res index a54fb51bd..f4ae74a78 100644 --- a/src/Payments/CardPayment.res +++ b/src/Payments/CardPayment.res @@ -125,8 +125,6 @@ let make = ( ~isGuestCustomer, ) - Console.log2(">>>> Logs Debug >>>>", (GlobalVars.enableLogging, GlobalVars.logEndpoint)) - let submitCallback = React.useCallback((ev: Window.event) => { let json = ev.data->safeParse let confirm = json->getDictFromJson->ConfirmType.itemToObjMapper diff --git a/webpack.common.js b/webpack.common.js index 51759491f..70f19b554 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -36,8 +36,6 @@ const getSdkUrl = (env, customUrl) => { return urls[env] || urls.local; }; -console.log("env", process.env); - const sdkUrl = getSdkUrl(sdkEnv, envSdkUrl); const getEnvironmentDomain = (prodDomain, integDomain, defaultDomain) => { switch (sdkEnv) { @@ -69,6 +67,7 @@ module.exports = (publicPath = "auto") => { app: "./index.js", HyperLoader: "./src/hyper-loader/HyperLoader.bs.js", }; + let definePluginValues = { repoName: JSON.stringify(repoName), repoVersion: JSON.stringify(repoVersion), @@ -83,7 +82,6 @@ module.exports = (publicPath = "auto") => { loggingLevel: JSON.stringify(loggingLevel), maxLogsPushedPerEventName: JSON.stringify(maxLogsPushedPerEventName), }; - console.log("definePluginValues", definePluginValues); const plugins = [ new MiniCssExtractPlugin(), From f9e150a80f08dea38945813ed9038187dc1019a5 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 11 Dec 2024 11:29:50 +0000 Subject: [PATCH 22/27] chore(release): 0.106.9 [skip ci] ## [0.106.9](https://github.com/juspay/hyperswitch-web/compare/v0.106.8...v0.106.9) (2024-12-11) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33bc1208d..5bd631684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.106.9](https://github.com/juspay/hyperswitch-web/compare/v0.106.8...v0.106.9) (2024-12-11) + ## [0.106.8](https://github.com/juspay/hyperswitch-web/compare/v0.106.7...v0.106.8) (2024-12-11) ## [0.106.7](https://github.com/juspay/hyperswitch-web/compare/v0.106.6...v0.106.7) (2024-12-11) diff --git a/package-lock.json b/package-lock.json index 4848a68a3..662148c8f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.106.8", + "version": "0.106.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.106.8", + "version": "0.106.9", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index a96b02957..a895dfe6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.106.8", + "version": "0.106.9", "main": "index.js", "private": true, "dependencies": { From aa0182b92018dfb95284198e2610fb40a0b6387e Mon Sep 17 00:00:00 2001 From: aritro2002 Date: Thu, 12 Dec 2024 18:05:45 +0530 Subject: [PATCH 23/27] fix: cartes bancaires logo not appearing in firefox (#837) --- public/icons/orca.svg | 54 +++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/public/icons/orca.svg b/public/icons/orca.svg index 933043688..17a7c7aaa 100644 --- a/public/icons/orca.svg +++ b/public/icons/orca.svg @@ -760,7 +760,27 @@ License)
- + - + \ No newline at end of file From eb3027fd7eeee1ffaaf17d3aec5feffb23ea611a Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 12 Dec 2024 12:38:32 +0000 Subject: [PATCH 24/27] chore(release): 0.106.10 [skip ci] ## [0.106.10](https://github.com/juspay/hyperswitch-web/compare/v0.106.9...v0.106.10) (2024-12-12) ### Bug Fixes * cartes bancaires logo not appearing in firefox ([#837](https://github.com/juspay/hyperswitch-web/issues/837)) ([aa0182b](https://github.com/juspay/hyperswitch-web/commit/aa0182b92018dfb95284198e2610fb40a0b6387e)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bd631684..8551fa38d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.106.10](https://github.com/juspay/hyperswitch-web/compare/v0.106.9...v0.106.10) (2024-12-12) + + +### Bug Fixes + +* cartes bancaires logo not appearing in firefox ([#837](https://github.com/juspay/hyperswitch-web/issues/837)) ([aa0182b](https://github.com/juspay/hyperswitch-web/commit/aa0182b92018dfb95284198e2610fb40a0b6387e)) + ## [0.106.9](https://github.com/juspay/hyperswitch-web/compare/v0.106.8...v0.106.9) (2024-12-11) ## [0.106.8](https://github.com/juspay/hyperswitch-web/compare/v0.106.7...v0.106.8) (2024-12-11) diff --git a/package-lock.json b/package-lock.json index 662148c8f..8284cc61b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.106.9", + "version": "0.106.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.106.9", + "version": "0.106.10", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index a895dfe6b..964376307 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.106.9", + "version": "0.106.10", "main": "index.js", "private": true, "dependencies": { From 838d09a3d09de7ca789352a2ae874408a3dc44c7 Mon Sep 17 00:00:00 2001 From: RustProfi <32622654+RustProfi@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:27:24 +0100 Subject: [PATCH 25/27] docs: increase readme for try it local for demo playground (#835) Co-authored-by: Marno Janetzky Co-authored-by: Pritish Budhiraja --- Hyperswitch-React-Demo-App/README.md | 25 ++++++++++++++++++++++--- README.md | 18 ++++++++++-------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/Hyperswitch-React-Demo-App/README.md b/Hyperswitch-React-Demo-App/README.md index 206848bfe..c47787571 100644 --- a/Hyperswitch-React-Demo-App/README.md +++ b/Hyperswitch-React-Demo-App/README.md @@ -21,7 +21,26 @@ npm install npm start ``` -This will start the react server running on localhost:4242. Note that the -backend server runs on localhost:5252, but the React UI will be available at -localhost:4242. API requests to your backend are proxied by the +This will start the react server running on localhost:5252. API requests to your backend are proxied by the create-react-app server using the `proxy` setting in `./package.json`. + +## Example config using our Sandbox URL +``` +STATIC_DIR=./dist +HYPERSWITCH_PUBLISHABLE_KEY=pk_snd_*** # Replace with your publishable key +HYPERSWITCH_SECRET_KEY=snd_*** # Replace with your API key +HYPERSWITCH_SERVER_URL=https://sandbox.hyperswitch.io # Our Sandbox server is used +HYPERSWITCH_CLIENT_URL=http://localhost:9050 # Your local running SDK +SELF_SERVER_URL=http://localhost:5252 # Your local running demo server +PROFILE_ID="" +``` + +## Troubleshooting +If your demo application is not working, you can check the following to hopefully find the issue. + +- Make sure you have configured the [.env](.env) file correctly. + - Publishable Key `HYPERSWITCH_PUBLISHABLE_KEY` and API Key `HYPERSWITCH_SECRET_KEY` belong to the server `HYPERSWITCH_SERVER_URL`. If you use our Sandbox URL, use publishable key and API key from the hyperswitch website. If you are using your self-hosted backend, use your locally created publishable key and API Key. + - The URL's must not have a slash at the end. +- Check that you have opened the demo application on the correct port. The default should be [localhost:5252](http://localhost:5252). Check the [webpack.dev.js](./webpack.dev.js) file to see if it is different. +- Make sure you have three terminal windows open and running. If you are running your local backend, it has to be one more. +- Open your browser's development tools (F12 in most browsers) and check the network tab for failed rest calls and the console for errors. diff --git a/README.md b/README.md index 4b565c7e9..5be2c943b 100644 --- a/README.md +++ b/README.md @@ -65,19 +65,20 @@ Ways to get started with Hyperswitch: ### 🛠️ Try it in Local -    Before you start the local setup, you need to understand a few configs - +    You will need to understand and configure a few configurations before starting the local setup. - - #### Env Configs for Demo App - **`HYPERSWITCH_PUBLISHABLE_KEY`:** The publishable key of your Hyperswitch account. This key will start with `pk_dev_` for local development, `pk_snd_` for sandbox, and `pk_prd_` for production. - - **`HYPERSWITCH_SECRET_KEY`:** The API key of your Hyperswitch account that is used to authenticate API requests from your merchant server. On the Hyperswitch Dashboard, locate the "Developers" section, then click on [API Keys](https://app.hyperswitch.io/developer-api-keys). Here, you can generate your API Key. + - **`HYPERSWITCH_SECRET_KEY`:** The API key of your Hyperswitch account that is used to authenticate API requests from your merchant server. - - **`HYPERSWITCH_SERVER_URL`:** The URL of your hosted Hyperswitch backend server. Alternatively, you can use our Sandbox URL (https://sandbox.hyperswitch.io) or specify your backend running locally (e.g., http://localhost:8080). + - **`HYPERSWITCH_SERVER_URL`:** The URL of the Hyperswitch backend server. You may use our Sandbox URL (https://sandbox.hyperswitch.io). To do this, go to the Hyperswitch Dashboard, find the "Developers" section, then click on [API Keys](https://app.hyperswitch.io/dashboard/developer-api-keys). Here you can generate an API key (`HYPERSWITCH_SECRET_KEY`) and copy your publishable key (`HYPERSWITCH_PUBLISHABLE_KEY`).
+Alternatively, you can specify that your backend is running locally (e.g. http://localhost:8080). In this case, you will need to create the API key and publishable key locally. Read this [hyperswitch docs](https://github.com/juspay/hyperswitch/blob/main/docs/try_local_system.md) on how to do this. - - **`HYPERSWITCH_CLIENT_URL`:** The URL of your hosted Hyperswitch SDK. You can also use our Sandbox URL (https://beta.hyperswitch.io/v1) or specify your app running locally (e.g., http://localhost:9050). + - **`HYPERSWITCH_CLIENT_URL`:** The URL of your hosted Hyperswitch SDK (e.g. http://localhost:9050). You may also use our Sandbox URL (https://beta.hyperswitch.io/v1). - - **`SELF_SERVER_URL`:** The URL of the hosted server file for generating client-secret and for fetching urls & configs. (eg: http://localhost:9060/payments) + - **`SELF_SERVER_URL`:** The URL of the hosted server file for generating client-secret and for fetching urls & configs (eg: http://localhost:5252). - #### Env Configs for SDK @@ -106,7 +107,7 @@ Ways to get started with Hyperswitch: ### Setup the repo - 1. First install all the node modules by running the following command + 1. First install all the node modules by running the following command. ```bash npm install @@ -120,7 +121,7 @@ Ways to get started with Hyperswitch: npm run re:start ``` - - On the second terminal, run the following command for starting the server. + - On the second terminal, run the following command for starting the SDK server (by default on http://localhost:9050). ```bash npm run start @@ -136,7 +137,8 @@ Ways to get started with Hyperswitch: npm run start ``` - This will open a demo app where you can test your payments. + Now you can launch the demo app on http://localhost:5252/ where you can test your payments.
+ If you encounter any problems, please refer to the troubleshooting section of the [Hyperswitch-React-Demo-App Readme](./Hyperswitch-React-Demo-App/README.md#troubleshooting). > 💡 Alternatively, you can update `.env` file and use the commands > above From 904d10369cae6dd41b211493c932d94dad0943a6 Mon Sep 17 00:00:00 2001 From: sakksham7 <130480324+sakksham7@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:02:28 +0530 Subject: [PATCH 26/27] fix: samsung pay button rendering fixed (#838) --- src/Payments/SamsungPayComponent.res | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Payments/SamsungPayComponent.res b/src/Payments/SamsungPayComponent.res index b31fee143..4aee673ba 100644 --- a/src/Payments/SamsungPayComponent.res +++ b/src/Payments/SamsungPayComponent.res @@ -101,10 +101,11 @@ let make = (~sessionObj: option, ~walletOptions) => { }) None }, [isRenderSamsungPayButton]) - -
Int.toString}px`} - id="samsungpay-container" - className={`w-full flex flex-row justify-center rounded-md [&>*]:w-full [&>button]:!bg-contain`} - /> + +
Int.toString}px`} + id="samsungpay-container" + className={`w-full flex flex-row justify-center rounded-md [&>*]:w-full [&>button]:!bg-contain`} + /> + } From 08a0f95b6892ac2707acd372de473e9afccadaa5 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 16 Dec 2024 11:09:10 +0000 Subject: [PATCH 27/27] chore(release): 0.106.11 [skip ci] ## [0.106.11](https://github.com/juspay/hyperswitch-web/compare/v0.106.10...v0.106.11) (2024-12-16) ### Bug Fixes * samsung pay button rendering fixed ([#838](https://github.com/juspay/hyperswitch-web/issues/838)) ([904d103](https://github.com/juspay/hyperswitch-web/commit/904d10369cae6dd41b211493c932d94dad0943a6)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8551fa38d..ea3acc687 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.106.11](https://github.com/juspay/hyperswitch-web/compare/v0.106.10...v0.106.11) (2024-12-16) + + +### Bug Fixes + +* samsung pay button rendering fixed ([#838](https://github.com/juspay/hyperswitch-web/issues/838)) ([904d103](https://github.com/juspay/hyperswitch-web/commit/904d10369cae6dd41b211493c932d94dad0943a6)) + ## [0.106.10](https://github.com/juspay/hyperswitch-web/compare/v0.106.9...v0.106.10) (2024-12-12) diff --git a/package-lock.json b/package-lock.json index 8284cc61b..a2b69d851 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.106.10", + "version": "0.106.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.106.10", + "version": "0.106.11", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 964376307..adf30133e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.106.10", + "version": "0.106.11", "main": "index.js", "private": true, "dependencies": {