Skip to content

Instantly share code, notes, and snippets.

@tomchentw
Last active August 29, 2015 14:16
Show Gist options
  • Select an option

  • Save tomchentw/472efdee68aca393f9ea to your computer and use it in GitHub Desktop.

Select an option

Save tomchentw/472efdee68aca393f9ea to your computer and use it in GitHub Desktop.
'use strict';
var shop = require('../../../common/api/shop');
module.exports = function (context, payload, done) {
var products = payload.products;
context.dispatch('CART_CHECKOUT');
shop.buyProducts(products, function () {
context.dispatch('SUCCESS_CHECKOUT', {products: products});
done();
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment