Skip to content

Commit

Permalink
fix: ep payments setup (#74)
Browse files Browse the repository at this point in the history
* fix: ep payments setup was not passing options correctly

* chore: changeset
  • Loading branch information
field123 authored Sep 26, 2023
1 parent 16bd320 commit 51b0df0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/nervous-ligers-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"composable-cli": patch
---

ep payments setup was not passing options correctly
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ export function createEPPaymentsCommandHandler(
}
}

if (result.data.stripe_account !== options.accountId) {
spinner.succeed(`EP Payments was already setup.`)
return {
success: true,
data: {},
}
}

spinner.succeed(`EP Payments setup successfully.`)
return {
success: true,
Expand Down Expand Up @@ -158,7 +166,7 @@ async function epPaymentsOptionsPrompts(
let gatheredOptions = {}

if (!argsAccountId) {
const { algoliaApplicationId } = await inquirer.prompt([
const { accountId } = await inquirer.prompt([
{
type: "string",
name: "accountId",
Expand All @@ -168,7 +176,7 @@ async function epPaymentsOptionsPrompts(

gatheredOptions = {
...gatheredOptions,
appId: algoliaApplicationId,
accountId,
}
} else {
gatheredOptions = {
Expand All @@ -178,18 +186,18 @@ async function epPaymentsOptionsPrompts(
}

if (!argsPublishableKey) {
const { algoliaAdminApiKey } = await inquirer.prompt([
const { publishableKey } = await inquirer.prompt([
{
type: "password",
name: "algoliaAdminApiKey",
message: "What is your Algolia Admin API Key?",
name: "publishableKey",
message: "What is your EP Payments publishable key?",
mask: "*",
},
])

gatheredOptions = {
...gatheredOptions,
adminApiKey: algoliaAdminApiKey,
publishableKey,
}
} else {
gatheredOptions = {
Expand Down

0 comments on commit 51b0df0

Please sign in to comment.