Skip to content

Firebase cloud function to generate Wyre reservation ids and Checkout URLs

Notifications You must be signed in to change notification settings

werewolfe/wyre-reservations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create Wallet Order Reservations for Wyre Checkout

This sample creates a simple serverless Firebase cloud function to generate Wyre reservation ids and Checkout URLs.

Features

  • Create a Wallet Order Reservation on POST request. (view code).

Further reading:

Deploy and test

  • Create a Firebase Project using the Firebase Developer Console
  • Enable billing on your project by switching to the Blaze plan. See pricing for more details. This is required to be able to do requests to non-Google services.
  • Enable Google & Email sign-in in your authentication provider settings.
  • Install Firebase CLI Tools if you have not already and log in with firebase login.
  • Configure this sample to use your project using firebase use --add and select your project.
  • Install dependencies locally by running: cd functions; npm install; cd -
  • Add your Wyre API Key & Secret to firebase config:
    firebase functions:config:set wyre.key=YOUR-WYRE-KEY wyre.secret=YOUR-WYRE-SECRET-KEY
  • Firebase config instructions
  • Get your Wyre Account Id
  • Deploy your project using firebase deploy --only functions:wyreReservation
  • Test your Wallet Order Reservation integration by viewing your deployed site firebase open hosting:site

Run functions locally

firebase serve --only functions:wyreReservation

Going live

Once you’re ready to go live, you will need to exchange your test keys for your live keys. Reach out to [email protected] and schedule an integration review. See the Wyre dashboard for further details.

  • Update your Wyre keys config:
    firebase functions:config:set wyre.key=YOUR-WYRE-KEY  wyre.secret=YOUR-WYRE-SECRET-KEY
  • Redeploy functions for the changes to take effect firebase deploy --only functions:wyreReservation.

About

Firebase cloud function to generate Wyre reservation ids and Checkout URLs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published