Skip to content

Commit

Permalink
Merge branch 'main' into hide-saved-card-tick-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
prafulkoppalkar authored Jun 12, 2024
2 parents 577615b + a3526d2 commit 01f440e
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 18 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [0.62.2](https://github.com/juspay/hyperswitch-web/compare/v0.62.1...v0.62.2) (2024-06-11)


### Bug Fixes

* button border changes ([#438](https://github.com/juspay/hyperswitch-web/issues/438)) ([b1168a5](https://github.com/juspay/hyperswitch-web/commit/b1168a5d284e6363e34b295c54262b17c8e4fdd0))

## [0.62.1](https://github.com/juspay/hyperswitch-web/compare/v0.62.0...v0.62.1) (2024-06-11)


### Bug Fixes

* demo app docker url needed ([#437](https://github.com/juspay/hyperswitch-web/issues/437)) ([2fdf8a5](https://github.com/juspay/hyperswitch-web/commit/2fdf8a5d412e4e24984c876daaf1a9bd381c4400))

# [0.62.0](https://github.com/juspay/hyperswitch-web/compare/v0.61.2...v0.62.0) (2024-06-11)


Expand Down
25 changes: 13 additions & 12 deletions Hyperswitch-React-Demo-App/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,19 @@ app.get("/create-payment-intent", async (req, res) => {
},
};
if (SERVER_URL) {
const apiResponse = await fetch(
`${process.env.HYPERSWITCH_SERVER_URL}/payments`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
"api-key": process.env.HYPERSWITCH_SECRET_KEY,
},
body: JSON.stringify(request),
}
);
const url =
process.env.HYPERSWITCH_SERVER_URL_FOR_DEMO_APP ||
process.env.HYPERSWITCH_SERVER_URL;

const apiResponse = await fetch(`${url}/payments`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
"api-key": process.env.HYPERSWITCH_SECRET_KEY,
},
body: JSON.stringify(request),
});
paymentIntent = await apiResponse.json();

if (paymentIntent.error) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orca-payment-page",
"version": "0.62.0",
"version": "0.62.2",
"main": "index.js",
"private": true,
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/Payments/ApplePay.res
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ let make = (~sessionObj: option<JSON.t>) => {
height: 3rem;
display: flex;
cursor: pointer;
border-radius: 2px;
border-radius: ${options.wallets.style.buttonRadius->Int.toString}px;
}
.apple-pay-button-white-with-text {
-apple-pay-button-style: white;
Expand All @@ -166,7 +166,7 @@ let make = (~sessionObj: option<JSON.t>) => {
display: inline-flex;
justify-content: center;
font-size: 12px;
border-radius: 5px;
border-radius: ${options.wallets.style.buttonRadius->Int.toString}px;
padding: 0px;
box-sizing: border-box;
min-width: 200px;
Expand Down
1 change: 1 addition & 0 deletions src/Payments/GPay.res
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ let make = (~sessionObj: option<SessionsType.token>, ~thirdPartySessionObj: opti
},
"buttonSizeMode": "fill",
"buttonColor": options.wallets.style.theme == Dark ? "black" : "white",
"buttonRadius": options.wallets.style.buttonRadius,
}
obj->Identity.anyTypeToJson
}
Expand Down
2 changes: 1 addition & 1 deletion src/Payments/PayPal.res
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ let make = () => {
display: "inline-block",
color: textColor,
height: `${height->Int.toString}px`,
borderRadius: "2px",
borderRadius: `${options.wallets.style.buttonRadius->Int.toString}px`,
width: "100%",
backgroundColor: buttonColor,
}
Expand Down
3 changes: 3 additions & 0 deletions src/Types/PaymentType.res
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ type style = {
type_: styleTypeArray,
theme: theme,
height: (heightType, heightType, heightType, heightType),
buttonRadius: int,
}
type wallets = {
walletReturnUrl: string,
Expand Down Expand Up @@ -256,6 +257,7 @@ let defaultStyle = {
type_: (ApplePay(Default), GooglePay(Default), Paypal(Paypal)),
theme: Light,
height: (ApplePay(48), GooglePay(48), Paypal(48), Klarna(48)),
buttonRadius: 2,
}
let defaultWallets = {
walletReturnUrl: "",
Expand Down Expand Up @@ -770,6 +772,7 @@ let getStyle = (dict, str, logger) => {
type_: getWarningString(json, "type", "", ~logger)->getTypeArray(logger),
theme: getWarningString(json, "theme", "", ~logger)->getTheme(logger),
height: getNumberWithWarning(json, "height", 48, ~logger)->getHeightArray(logger),
buttonRadius: getNumberWithWarning(json, "buttonRadius", 2, ~logger),
}
style
})
Expand Down

0 comments on commit 01f440e

Please sign in to comment.