These are chat archives for reactioncommerce/reaction

8th
Feb 2017
Brent Hoover
@zenweasel
Feb 08 2017 00:02
Yeah, I am not able to replicate it here with a fresh install
sam stein
@samhstein
Feb 08 2017 00:04
k, i can try the docker
does this file exist on your install: Error: Cannot find module './lib/AuthorizeNetGateway.js'
Brent Hoover
@zenweasel
Feb 08 2017 00:07
I don’t think that’s one of our files. I think it’s a file used by the Authorize.net package
sam stein
@samhstein
Feb 08 2017 00:09
wonder if im getting the wrong package somehow
Jeremy Shimko
@jshimko
Feb 08 2017 00:09
that’s a relative path within the auth.net package
in the error…
at meteorInstall.imports.plugins.included.payments-authnet.server.methods.authnet.js
possibly an issue with the git clone?
try a fresh clone of development…
reaction init -b development
sam stein
@samhstein
Feb 08 2017 00:11
not sure think, i'll dust everything including the .meteor directory and try again
sam stein
@samhstein
Feb 08 2017 00:16
giving the new init a try after wiping clean
sam stein
@samhstein
Feb 08 2017 00:29
its chugging, fingers crossed.... any comments on integration?
Brent Hoover
@zenweasel
Feb 08 2017 00:30
I don’t believe there are any existing integrations with any ERP systems that I know of.
Depending on how coupled you want them to be it wouldn’t be that hard I would think
sam stein
@samhstein
Feb 08 2017 00:30
sounds promising, thats what were looking for / headed
Brent Hoover
@zenweasel
Feb 08 2017 00:31
if the system had an API, you could just add event handiers to hit the endpoints with new orders, etc.
sam stein
@samhstein
Feb 08 2017 00:32
yep, product data / inventory is where we really need the magic
Brent Hoover
@zenweasel
Feb 08 2017 00:32
from Reaction => ERP would be pretty trivial (data mapping not withstanding)
The other way might be a little tricker
Aaron Judd
@aaronjudd
Feb 08 2017 00:33
@samhstein I wonder if the Meteor version in your build is METEOR@1.4.2.5, because I’m seeing issues with the authnet package loading then.. (but not at our current version METEOR@1.4.2.3)
sam stein
@samhstein
Feb 08 2017 00:34
exactly, hoping there might be nice way to have the erp supply json for the products
Aaron Judd
@aaronjudd
Feb 08 2017 00:34
ah yes.. meteor-tool/.1.4.2_5.
Brent Hoover
@zenweasel
Feb 08 2017 00:34
you could also create a plug-in that polled the ERP for data and just added products
sam stein
@samhstein
Feb 08 2017 00:35
RUNNING!!!!
Aaron Judd
@aaronjudd
Feb 08 2017 00:41
Re: ERP -> just talking about this yesterday, and was thinking about some connectors for ERP and POS. I’ve been wondering if a really good connector to an existing system could be a good income earner in plugin / services marketplace. We could probably make a good example with some popular erp, that could serve as a template. probably impossible to get a one size fits all solution that is elegant.
sam stein
@samhstein
Feb 08 2017 00:42
looks good, gotta run but will be back with some more on the erp... thinking either nextErp or tryton....
Aaron Judd
@aaronjudd
Feb 08 2017 00:42
:thought_balloon: :thumbsup:
Brent Hoover
@zenweasel
Feb 08 2017 00:42
I’ve worked with Tryton before I believe (written in Python)
sam stein
@samhstein
Feb 08 2017 00:43
maybe an opportunity to do something, i have a customer that really wants a good ecom site but needs the erp / manufacturing, biz stuff to integrate with
Brent Hoover
@zenweasel
Feb 08 2017 00:44
yeah, ERP integtration/implementations are hard because it really depends on how the customer does business
sam stein
@samhstein
Feb 08 2017 00:44
the tryon view stuff is a mess imo, all xml docs and such, way to much refresh, rerendering
erpNext is getting bit of a following, python too
Brent Hoover
@zenweasel
Feb 08 2017 00:49
Odoo is the other one I have run across
sam stein
@samhstein
Feb 08 2017 01:34
yea, have done a few odoo trys but its really heavy and a pita to deal with
if u guys have any examples or something to look at far as a connector or bridge i'd like to take a look
Aesop7
@Aesop7
Feb 08 2017 02:37
Does the domain need to be on HTTPS in order for Stripe to work?
Brent Hoover
@zenweasel
Feb 08 2017 02:40
No. Because the connection to Stripe is still over HTTPS
Aesop7
@Aesop7
Feb 08 2017 02:53
hmm
Shot in the dark, but does anyone know if it's possible to browse the reaction config file from Galaxy?
I wonder if Reaction's back-end somehow isn't updating that field in the file (maybe it has to do with permissins)
Brent Hoover
@zenweasel
Feb 08 2017 02:58
not sure what you mean by updating the file
Aesop7
@Aesop7
Feb 08 2017 02:59
In the documentation it says that "It can also be done in private/settings/reaction.json"
I thought maybe the backend was writing to that file, but maybe the file isn't writable
Brent Hoover
@zenweasel
Feb 08 2017 03:00
No, changes are not saved to that file. Just to the db. The file is for reading only
Aesop7
@Aesop7
Feb 08 2017 03:00
ah, okay i'll check the db... which collection?
Brent Hoover
@zenweasel
Feb 08 2017 03:01
Most of it should write to Packages
note that Reaction also won’t overwrite values that are already there, so if you change something you need to either reset or drop the collection, or remove the record
Aesop7
@Aesop7
Feb 08 2017 03:02
the key is in there
and it's the secret key
"mode" is set to false...
but "enabled" is true
image.png
this is the error i'm still getting
Brent Hoover
@zenweasel
Feb 08 2017 03:05
I know that the Stripe key that works for me for testing looks like: sk_test_XXXXXXXXXXXXXXXXXXXXX
Aesop7
@Aesop7
Feb 08 2017 03:08
image.png
yep
obviously the rest of the key is cut off in that screenshot :)
Brent Hoover
@zenweasel
Feb 08 2017 03:08
Right
which branch/version are you on?
I was just able to run an order through using Stripe w/o a problem
Aesop7
@Aesop7
Feb 08 2017 03:15
still trying to find it.. 1 sec
"version": "0.14.2",
Brent Hoover
@zenweasel
Feb 08 2017 03:17
that’s quite an old version
although, Stripe has consistently worked for quite a while
Aesop7
@Aesop7
Feb 08 2017 03:18
we had to customize a ton to try to get some specific customized functionality working. All that's missing for us is Stripe integration!
Brent Hoover
@zenweasel
Feb 08 2017 03:20
Yeah I don’t know. That might be something to take up with Stripe support. We only really report that error when that’s the error Stripe gives to us. Alternately you could try running the current version with that key and see if you get different results.
in fact, I would say definitely try that. Because that would tell you if it’s the key or the code
Aesop7
@Aesop7
Feb 08 2017 03:20
I was able to get this log info from Galaxy:
Brent Hoover
@zenweasel
Feb 08 2017 03:21
Because I feel as confident as I can be that the current Stripe integration works. People are using it in production.
Aesop7
@Aesop7
Feb 08 2017 03:21
90m Error: Invalid Stripe Credentials [403]
8v4p
2017-02-07 22:20:13-05:00 at [object Object].run (imports/plugins/included/stripe/server/methods/stripeapi.js:53:13)
8v4p
2017-02-07 22:20:13-05:00 at ValidatedMethod._execute (packages/mdg:validated-method/validated-method.js:93:12)
8v4p
2017-02-07 22:20:13-05:00 at [object Object].ValidatedMethod.connection.methods._connection$methods.(anonymous function) (packages/mdg:validated-method/validated-method.js:54:23)
8v4p
2017-02-07 22:20:13-05:00 at packages/check/match.js:107:1
8v4p
2017-02-07 22:20:13-05:00 at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
8v4p
2017-02-07 22:20:13-05:00 at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check/match.js:106:1)
8v4p
2017-02-07 22:20:13-05:00 at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1708:18)
8v4p
2017-02-07 22:20:13-05:00 at packages/ddp-server/livedata_server.js:1624:18
8v4p
2017-02-07 22:20:13-05:00 at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
8v4p
2017-02-07 22:20:13-05:00 at Server.apply (packages/ddp-server/livedata_server.js:1623:45)
8v4p
2017-02-07 22:20:13-05:00 at packages/kadira:flow-router-ssr/server/plugins/ssr_data.js:67:23
8v4p
2017-02-07 22:20:13-05:00 at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
8v4p
2017-02-07 22:20:13-05:00 at Object.Meteor.(anonymous function) [as apply] (packages/kadira:flow-router-ssr/server/plugins/ssr_data.js:66:44)
8v4p
2017-02-07 22:20:13-05:00 at ValidatedMethod.call (packages/mdg:validated-method/validated-method.js:67:30)
8v4p
2017-02-07 22:20:13-05:00 at [object Object].run (imports/plugins/included/stripe/server/methods/stripeapi.js:69:57)
8v4p
2017-02-07 22:20:13-05:00 at ValidatedMethod._execute (packages/mdg:validated-method/validated-method.js:93:12)
8v4p
2017-02-07 22:20:13-05:00 at [object Object].ValidatedMethod.connection.methods._connection$methods.(anonymous function) (packages/mdg:validated-method/validated-method.js:54:23)
8v4p
2017-02-07 22:20:13-05:00 at packages/check/match.js:107:1
8v4p
2017-02-07 22:20:13-05:00 at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
8v4p
2017-02-07 22:20:13-05:00 at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check/match.js:106:1)
8v4p
2017-02-07 22:20:13-05:00 at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1708:18)
8v4p
2017-02-07 22:20:13-05:00 at packages/ddp-server/livedata_server.js:1624:18
I'll try chatting with the guys at Stripe. But I thought i'd post that error log in case anyone here can make heads or tails of it
Brent Hoover
@zenweasel
Feb 08 2017 03:24
Hmmm
Can you run your version locally?
I think I might see something
Aesop7
@Aesop7
Feb 08 2017 03:26
i'm testing it right now... 1 min
(reaction can take a while to boot up for me locally)
Brent Hoover
@zenweasel
Feb 08 2017 03:26
const settings = Packages.findOne({ name: "reaction-stripe" }).settings;

this line might need to be changed to:

const settings = Packages.findOne({
name: "reaction-stripe”,
shopId: Reaction.getShopId()
}).settings;

You would need to add the Reaction import as well
import { Reaction, Logger } from “/server/api”;

If it’s grabbing the credentials for the wrong shop, then that might explain why it’s blank
Aesop7
@Aesop7
Feb 08 2017 03:30
nice find! I can try incorporating that tomorrow
thank you
I'm guessing the new versions take care of that piece?
Brent Hoover
@zenweasel
Feb 08 2017 03:31
I feel pretty confident that’s your problem. I think most people delete that second shop so I am guessing that’s why we haven’t run into that before
No, that bug (if that’s the bug) is in the current version. Not sure why it hasn’t popped up more often.
Aesop7
@Aesop7
Feb 08 2017 03:32
I wonder if I should just delete that shop... might be easier? Just remove it from the collection?
fair enough
I'll see if deleting fixes it locally
Brent Hoover
@zenweasel
Feb 08 2017 03:33
You might want to do that as well, just because you don’t need that data. But let me know whether that change fixes it, so I can make sure it gets fixed
Aesop7
@Aesop7
Feb 08 2017 03:34
eventually we want to incorporate marketplace-like functionality, so I left in there just for reference. Speaking of which, do any of the newer versions expand the support for marketplace functionality (i.e. etsy-like functionality)?
i'm testing the db update locally right now...
Brent Hoover
@zenweasel
Feb 08 2017 03:34
Yes. I am actuallly currently testing a PR that will bring Marketplace functionality.
https://github.com/reactioncommerce/reaction/pull/1758/files#submit-review
Not sure if it would exactly meet your needs, but it probably puts you closer
Aesop7
@Aesop7
Feb 08 2017 03:45
interesting, on localhost I get stripe connection succeeded, but charge failed... I'm using the test key too :worried:
I20170207-22:39:39.575(-5)? 03:39:39.574Z  INFO Reaction: Stripe Call succeeded but charge failed
I20170207-22:39:39.968(-5)? 03:39:39.967Z ERROR Reaction: Cannot read property 'error' of undefined
I20170207-22:39:39.968(-5)?   TypeError: Cannot read property 'error' of undefined
I20170207-22:39:39.969(-5)?       at [object Object].stripeSubmit (imports/plugins/included/stripe/server/methods/stripe.js:93:18)
I20170207-22:39:39.969(-5)?       at packages/check/match.js:107:1
I20170207-22:39:39.969(-5)?       at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20170207-22:39:39.970(-5)?       at Object.exports.Match._failIfArgumentsAreNotAllChecked (packages/check/match.js:106:1)
I20170207-22:39:39.971(-5)?       at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1708:18)
I20170207-22:39:39.971(-5)?       at packages/ddp-server/livedata_server.js:711:19
I20170207-22:39:39.971(-5)?       at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20170207-22:39:39.972(-5)?       at packages/ddp-server/livedata_server.js:709:40
I20170207-22:39:39.972(-5)?       at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20170207-22:39:39.972(-5)?       at packages/ddp-server/livedata_server.js:707:46
I20170207-22:39:39.973(-5)?       at Session.method (packages/ddp-server/livedata_server.js:681:23)
I20170207-22:39:39.973(-5)?       at packages/ddp-server/livedata_server.js:551:43
and I get that with one shop or with two :/
Brent Hoover
@zenweasel
Feb 08 2017 03:46
did you make the change I suggested?
Aesop7
@Aesop7
Feb 08 2017 03:47
not to the code (yet)... it's getting late here and I'm fading. I will try that out tomorrow.
Brent Hoover
@zenweasel
Feb 08 2017 03:47
You might want to compare that file (stripeapi.js) with the current one
Aesop7
@Aesop7
Feb 08 2017 03:47
good call
maybe i'll run a diff to see what's changed since
Brent Hoover
@zenweasel
Feb 08 2017 03:47
I know of at least one bug fix re: refunds that I did in 18.0
Aesop7
@Aesop7
Feb 08 2017 03:48
I appreciate the help @zenweasel And i'll definitely be trying to incorporate some of that marketplace functionality as soon as we get a chance :D
:thumbsup: I'll see if I can update it tomorrow
Brent Hoover
@zenweasel
Feb 08 2017 03:48
Right on. Let me know how it goes. Hopefully we can get you live soon
Aaron Judd
@aaronjudd
Feb 08 2017 03:48
just jumping in … I think that Packages.findOne is filtered by the shop in the publication, even if you don’t pass explicitly.. so I don’t think that’s it. I have seen this error before.. long time ago, so I don’t remember the cause..
Brent Hoover
@zenweasel
Feb 08 2017 03:49
it’s filtered on the server side?
how could that be?
Aaron Judd
@aaronjudd
Feb 08 2017 03:49
yes
Brent Hoover
@zenweasel
Feb 08 2017 03:50
on the servers-side, aren’t you querying the db directly, not using a pub/sub?
Aaron Judd
@aaronjudd
Feb 08 2017 03:50
this is radicaly different than the packages publication that 0.14 was using, but see here: https://github.com/reactioncommerce/reaction/blob/master/server/publications/collections/packages.js#L73
is that settings find on the server?
Brent Hoover
@zenweasel
Feb 08 2017 03:50
Yes
Aaron Judd
@aaronjudd
Feb 08 2017 03:51
oh, well, that **s.
Aaron Judd
@aaronjudd
Feb 08 2017 03:52
oh yeah, that needs the shop, you are correct…
Brent Hoover
@zenweasel
Feb 08 2017 03:52
weird, that we never ran into before
maybe the default shop always gets inserted first so it’s normally first when doing findOne shrug
Aaron Judd
@aaronjudd
Feb 08 2017 03:53
yes, that’s true
Brent Hoover
@zenweasel
Feb 08 2017 03:54
I feel like the bug with “call succeeded but charge failed” is something that Erik fixed
Aaron Judd
@aaronjudd
Feb 08 2017 03:54
Roles would get checked so maybe not getting anything..
Brent Hoover
@zenweasel
Feb 08 2017 03:54
that error message could be better as well.
I say that because I am fairly certain that’s my code. :(
I was so naive then. Like 8 months ago.
Aaron Judd
@aaronjudd
Feb 08 2017 03:56
yup, all that ^^. pretty certain we’ve cleaned up a fair amount there, Erik has cleaned up and I did a refactor in (18?) 19..
lol
Brent Hoover
@zenweasel
Feb 08 2017 03:57
Yeah, But I think that stripeapi file is pretty intact
Aaron Judd
@aaronjudd
Feb 08 2017 03:57
well, I know just the person to take care of this, lol
Brent Hoover
@zenweasel
Feb 08 2017 03:57
Yep. I’ll let Erik know
jk, I’ll write the issue now
Aaron Judd
@aaronjudd
Feb 08 2017 03:58
lol, I thought that was good answer! re: the packages thing…. we probably should do a broader search of server code..
Brent Hoover
@zenweasel
Feb 08 2017 03:58
agreed
and move it to a common helper, etc
Brent Hoover
@zenweasel
Feb 08 2017 04:01
Yep, except it should probably take a couple more parameters, but yeah
getDomain works on the server-side?
I guesss it must
Aaron Judd
@aaronjudd
Feb 08 2017 04:03
it’s passed in by the client in all kinds of trickery…
Brent Hoover
@zenweasel
Feb 08 2017 04:03
interesting
andela-euyiosa
@andela-uenabulele
Feb 08 2017 13:46
Hi, how can i create a global variable like Reaction.shopId
Aaron Judd
@aaronjudd
Feb 08 2017 14:52
Reaction.getShopId() is available for that example, but you should be able to add additional properties to the Reaction object in any import (or however you are using it, don’t know enough about what the goal is). You can see how the import/exports work here https://github.com/reactioncommerce/reaction/blob/master/server/api/index.js
andela-euyiosa
@andela-uenabulele
Feb 08 2017 15:33
thanks @aaronjudd I am trying to create a Reaction.vendor key Reaction.vendor = "meAsAVendor" , Is that the way to go? because its Reaction.vendor still logs as undefined. and yes I am importing reaction
Aaron Judd
@aaronjudd
Feb 08 2017 17:13
have you looked at the work in PR #1758? mostly I’d recommend you look at getSellerShopId()/getShopId(), and also take a look at the roles implementation (" me a as a vendor" would be a role, that would be determined by the security group (the shop id) )
we have a channel for marketplace implementation as well, if you need a place to talk through a “multi-vendor” scenario