-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing
mailService
in Stripe Hook extension guide (#22450)
Co-authored-by: Pascal Jufer <[email protected]>
- Loading branch information
1 parent
b5b144a
commit b76a6e8
Showing
2 changed files
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,5 +124,6 @@ | |
- jonaskohl | ||
- kimiaabt | ||
- the-other-dev | ||
- Oleksii909 | ||
- magiudev | ||
- burka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,7 @@ Use the `ItemsService` to update the customer record. Initialize the service and | |
stripe.customers | ||
.create({}) | ||
.then((customer) => { | ||
const customers = new ItemsService(collection, { schema: schema }); // [!code ++] | ||
const customers = new ItemsService(collection, { schema }); // [!code ++] | ||
customers.updateByQuery({ filter: { id: key } }, { stripe_id: customer.id }, { emitEvents: false }); // [!code ++] | ||
}) | ||
.catch((error) => {}); | ||
|
@@ -117,6 +117,7 @@ stripe.customers | |
.create({}) | ||
.then((customer) => {}) | ||
.catch((error) => { | ||
const mailService = new MailService({ schema }); | ||
mailService.send({ // [!code ++] | ||
to: '[email protected]', // [!code ++] | ||
from: '[email protected]', // [!code ++] | ||
|
@@ -178,10 +179,11 @@ export default ({ action }, { env, services }) => { | |
email: payload.email_address, | ||
}) | ||
.then((customer) => { | ||
const customers = new ItemsService(collection, { schema: schema }); | ||
const customers = new ItemsService(collection, { schema }); | ||
customers.updateByQuery({ filter: { id: key } }, { stripe_id: customer.id }, { emitEvents: false }); | ||
}) | ||
.catch((error) => { | ||
const mailService = new MailService({ schema }); | ||
mailService.send({ | ||
to: '[email protected]', | ||
from: '[email protected]', | ||
|