These are chat archives for reactioncommerce/reaction

6th
Feb 2018
edecamps
@edecamps
Feb 06 2018 01:40
Hey all. I have finished setting up my reaction ecommerce, but i want to make it look better. I'd rather pay someone because it's urgent.. where could I hire someone to do this? (Freelancer.com? etc..)
Brent Hoover
@zenweasel
Feb 06 2018 01:41
You might want to post on the jobs board on the forum: https://forums.reactioncommerce.com/c/jobs
edecamps
@edecamps
Feb 06 2018 01:42
oh! nice. My bad, should've checked first..
Brent Hoover
@zenweasel
Feb 06 2018 01:42
No worries. :+1:
Srikanth K
@srikanthkolli
Feb 06 2018 04:10
@prinzdezibel i will try that. thankyou. one more question. Every time i add new custom plugin i need to run reaction reset and start the server to enable the plugin. Issue with reaction reset is it clears all the data and reimports default data. I'm worried to enable to new plugin after i setup shop with real products. As it resets all my data. Any suggestion to keep mongo data as it is and enable new plugins?
Shanmugaraj M
@shanmugarajbe
Feb 06 2018 04:22
image.png
Getting this error while starting reaction. How to resolve this error?
Cannot read property 'domains' of undefined
Michael Jenny
@prinzdezibel
Feb 06 2018 07:31
@srikanthkolli You should keep your products in data fixtures. that way you can reset the database during development without hassle. See swag shop repository for an example: https://github.com/reactioncommerce/reaction-swag-shop
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 07:47
Can I use nodejs builtin package "crypto" in reaction commerce to create hash?
Michael Jenny
@prinzdezibel
Feb 06 2018 08:19
@shanmugarajbe It looks like there's no shop document in your db.
collection Shops
Shanmugaraj M
@shanmugarajbe
Feb 06 2018 09:13
@prinzdezibel - I have Shops.json file in the private data folder. It started working after replacing Shops.json file with this file -https://raw.githubusercontent.com/reactioncommerce/reaction/master/private/data/Shops.json. It thrown me an error when I tried to use the Example Plugin Shops.json - https://raw.githubusercontent.com/reactioncommerce/reaction-example-plugin/master/private/data/Shops.json. Both having the same SHOP ID.
Michael Jenny
@prinzdezibel
Feb 06 2018 09:20
@shanmugarajbe Oh. Nice catch!
can you try to put "shopType": "primary" to the ExamplePluginShops.json and see if that resolves your problem?
like in the other file?
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 09:21

Any help here?

Can I use nodejs builtin package "crypto" in reaction commerce to create hash?

Michael Jenny
@prinzdezibel
Feb 06 2018 09:21
@harshalyeole-tudip why do you think you couldn't?
Brent Hoover
@zenweasel
Feb 06 2018 09:22
@harshalyeole-tudip are you trying to replace bcrypt?
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 09:26
Nope
I just want to create unique hash on user signup.
Brent Hoover
@zenweasel
Feb 06 2018 09:27
You can use it as long as it's server side
Just import it just like anything else
Shanmugaraj M
@shanmugarajbe
Feb 06 2018 09:34
@prinzdezibel - Sure I will try it.
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 09:37
Ok
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 09:46
Can anyone explain me stripe payment workflow using Reaction Commerce?
Brent Hoover
@zenweasel
Feb 06 2018 09:48
What would you like to know?
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 09:49
When do we create stripe token
and when do we charge it?
and do we store card credentials in DB.
Brent Hoover
@zenweasel
Feb 06 2018 09:58
On checkout we do an authorize. We do not store card data in the db. At least not the card number or cvv
We don't use the token method
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 10:04
then what do we use?
like its standard method correct?
Creating token from Client and then server charges the token with amount
am I correct?
@zenweasel
Brent Hoover
@zenweasel
Feb 06 2018 10:07
No, we send the credit card info and get a charge ID back
We don't create a token
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 10:45
Ok

So when user clicks on place order from checkout flow, then this all happens?

No, we send the credit card info and get a charge ID back

And what does "Capture Payment" from Admin Dashboard's order section mean?
Brent Hoover
@zenweasel
Feb 06 2018 10:50
The original transaction is only an authorization. Capture is when the transaction is finalized and money is actually transferred
This is actually covered in more depth in the documentation in the payment plugin tutorial I believe
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 10:56
ok
I'll check that
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 11:04

https://docs.reactioncommerce.com/reaction-docs/master/reaction-payments

So I read this doc and understood this:

2 Steps:
1 - AUTHORISE
(Amount is not deducted from users account)
2- CAPTURE
(Amount is deducted from user's account)

Brent Hoover
@zenweasel
Feb 06 2018 11:05
Correct
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 11:05
Ok
So there is no concept like token && charge
there is just authorize && charge.
Brent Hoover
@zenweasel
Feb 06 2018 11:08
Correct
The consumer does not see the two steps
A charge appears on their card immediately
But it can be canceled and will expire after 30 days
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 11:10
Ok
So you mean there are two steps but users directly see's the second step i.e CHARGE
Brent Hoover
@zenweasel
Feb 06 2018 11:12
No, they only see the first step. To them it looks like the money is taken
Stepping out for a while now
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 11:21
ok
@zenweasel
So what is the actual status?
Like where does the money go at first step?
As per what you say, money is actually deducted in 2nd step and as 2nd step and 1st step can have difference of days. what is the actual scenario of money here?
You can answer this when you are back. :)
aniwebcastle
@aniwebcastle
Feb 06 2018 11:58
where to set SKIP_FIXTURES in reaction?
Michael Jenny
@prinzdezibel
Feb 06 2018 12:15
@aniwebcastle Depends if you really want to SKIP_FIXTURES. In certain cases you actually want take care of the data fixtures yourself.
In many cases, you can just put your data fixtures in the existing files (/private/data)
If you want do skip them, you'd have to define it as environment variable.
aniwebcastle
@aniwebcastle
Feb 06 2018 12:18
I have used set SKIP_FIXTURES=true in windows and it is working
Michael Jenny
@prinzdezibel
Feb 06 2018 12:31
@aniwebcastle cool
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 13:02

@prinzdezibel @zenweasel

I have installed Simple rest and I am using Postman to hit Login & SignUp APIs.

Now I wish to add one more field in collection of user, on SIgn-Up and Update the same always on LOGIN.

How can I achieve that? Like is there any method?

I have found "OnCreateUser" & "OnLogin" functions in /server/startup/accounts.js

But the problem here is this.

Those two functions are only invoked when we do "SignUp"/"Login" using reacton commerce and not when I use "Simple:Rest" login/signup endpoints.

Michael Jenny
@prinzdezibel
Feb 06 2018 13:15
@harshalyeole-tudip can't say much to that without digging into it.
Brent Hoover
@zenweasel
Feb 06 2018 13:17
I believe there are Event hooks that fire on these events. You could probably use those to do whatever you want
Just look closely at the code
Harshal Yeole
@harshalyeole-tudip
Feb 06 2018 13:30
Ok
I am searching for them since morning
like from 5-6 hrs
Can you guys help me out here?
Can I create my own hooks?
Like onLogin hook or onSignUp hook?
Daniel Honig
@dhonig
Feb 06 2018 16:30
Hey reactionaries, I am trying to reason about something. What would be the consequences for using something like OpenLayers https://openlayers.org/ Outside of React and just using templates that pull in plain ole js? To me it seems like we would lose alot for doing this in the reaction environment. Also OpenLayers is about 700K its another beast to download, where reaction already ships alot of code down.