Chapter    14

Charge and E-Mail

In Chapter 12, I showed you how to use the cloud function to create and charge a Stripe Customer. In Chapter 13, I showed you how to use a cloud function to pay with Apple Pay. All three methods call functions of “createStripeCustomer,” “chargeCustomer,” and “chargeToken,” respectively, in a JavaScript file with a name of “main.js” that you have written and hosted on Parse. The three functions take a dictionary input to execute and return either a string if successful or an NSError object if any error occurs. In this chapter, I will show you how you can implement these three JavaScript functions. In addition, you will learn how to use Mailgun to send an order confirmation once Stripe has successfully charged a ...

Get iOS eCommerce App Development with Parse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.