Skip to content

Commit 11b2a9a

Browse files
committed
update post
1 parent 9716378 commit 11b2a9a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/content/create-booking-forms.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ export default {
190190

191191
🪀 The `name()` watcher emits the customer data to the root component.
192192

193+
🪀 We have a `div` that loops over the `customers` array and assigns each property in the array to a `v-model` instance on the relevant component.
194+
193195
Next we will add the third form in third tab to execute the mutation, create a file called `CheckoutTab.vue`:
194196

195197
```javascript
@@ -206,7 +208,7 @@ Next we will add the third form in third tab to execute the mutation, create a f
206208
class="stripe-card mt-20 w-full"
207209
id="card"
208210
:class="{ complete }"
209-
stripe="pk_test_IQEA1vOcYdHCZWvmHTZkeTt3"
211+
stripe="{{stripe}}"
210212
:options="stripeOptions"
211213
/>
212214
<BodyOne v-if="errors"> {{ showErrorMessage }}</BodyOne>
@@ -240,6 +242,11 @@ export default {
240242
BodyOne,
241243
Card,
242244
},
245+
data() {
246+
return {
247+
stripe: process.env.VUE_APP_STRIPE,
248+
};
249+
},
243250
props: {
244251
errors: Boolean,
245252
loading: Boolean,
@@ -270,11 +277,13 @@ export default {
270277

271278
```
272279

273-
Here we are simply using the Stripe vue library to allow the user to enter their card. We are also conditionally rendering stuff which will come into play when we render the mutation.
280+
🪀 Here we are simply using the Stripe vue library to allow the user to enter their card. We are also conditionally rendering content if there is an error or the mutation is in a loading state.
281+
282+
🪀
274283

275284
Make sure you add the package:
276285

277-
```
286+
```bash
278287
$ yarn add vue-stripe-elements-plus
279288
```
280289

0 commit comments

Comments
 (0)