Skip to content

Commit

Permalink
Pull request #213: Permanent fix invalid publishable key error
Browse files Browse the repository at this point in the history
Merge in EXC/orca-elements from praful/permanentFix to master

* commit '7fecd79ad4d950ee07d1a29466e92e2e5465d73c':
  changed the pub key check logic
  Added a check for prod key removed warning for disableSavedCard prop
  • Loading branch information
prafulkoppalkar authored and arun.mishra committed Sep 8, 2023
2 parents 47a4b39 + 7fecd79 commit 0ba890b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Types/PaymentType.res
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ let itemToObjMapper = (dict, logger) => {
"terms",
"wallets",
"showCardFormByDefault",
"disableSaveCards",
],
dict,
"options",
Expand Down
8 changes: 7 additions & 1 deletion src/orca-loader/Hyper.res
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ let make = (publishableKey, _options: option<Js.Json.t>, analyticsInfo: option<J
(),
)

if publishableKey == "" || !(publishableKey->Js.String2.startsWith("pk_snd_")) {
if (
publishableKey == "" ||
!(
publishableKey->Js.String2.startsWith("pk_snd_") ||
publishableKey->Js.String2.startsWith("pk_prd_")
)
) {
manageErrorWarning(INVALID_PK, (), ~logger)
}
if (
Expand Down

0 comments on commit 0ba890b

Please sign in to comment.