These are chat archives for reactioncommerce/reaction
Guys need help:
Getting error:ReferenceError: ReactionCore is not defined
I have added reactionCommerce:core package, want extend schema defination
In schema defination I am writing something:
ReactionCore.Schemas.CorreiosProduct = new SimpleSchema([
Stripe.apiKey = "sk_test_X9JzDdKYb0vu9QowwO7IPX8n"; Customer.retrieve("cus_BQThznZ4t88aSs");
Right now I’m not sure we’re storing the customer id anywhere other than the raw transaction that is returned and stored on the order. It would probably be worth storing this customer object on the user in payment cases where we would want to retreive that customer id for future payments.
re: when the customerId is stored on the transaction
The transaction is a
blackbox object that is returned from a payment provider, so it’s not really ever “stored” there, the
customer property is part of the transaction object when it’s returned from Stripe.
In the case of marketplace, this happens on this line https://github.com/reactioncommerce/reaction/blob/marketplace/imports/plugins/included/payments-stripe/server/methods/stripe.js#L337
As to what the best way to create a subscription is, I’m not sure, we could add an Event Hook after the charge is created in Stripe
Is it possible it would be better to have an entirely separate method for checking out with subscription payments? I haven’t done much research into how those get triggered, captured, etc. Adding a hook would be trivial, but you seemed to have some reservations about that direction this morning.