Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Marketplace] Spencer 799 marketplace stripe connect #2167

Merged
merged 352 commits into from Apr 26, 2017
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
352 commits
Select commit Hold shift + click to select a range
7ab967c
updated reaction Apps
Nov 22, 2016
e2d11a0
Merge pull request #1585 from reactioncommerce/ek-more-emails
Nov 22, 2016
b90e0f4
Merge remote-tracking branch 'origin/development' into release-0.18.0
Nov 22, 2016
ac48108
Merge remote-tracking branch 'origin/release-0.18.0' into package-set…
Nov 22, 2016
8dbd1dc
allow admin users to add products via Add Product when they have the …
lcampanis Nov 22, 2016
2e25174
Add localhost WS browser-policy
Nov 23, 2016
c83c856
code cleanup
lcampanis Nov 23, 2016
81893a7
Payment package updates, removes name
Nov 23, 2016
a4704d6
Move mergeDeep into /lib/api/helpers
Nov 24, 2016
b9865ed
Update settings handling
Nov 24, 2016
2869e66
Cleanup panels in payments, taxes
Nov 24, 2016
3d56c34
Updated package
Nov 25, 2016
5825750
PayPal as split payment methods
Nov 25, 2016
4aa28e1
allow guests to become sellers when marketplace module is enabled, de…
lcampanis Nov 26, 2016
a04cabe
fixed translation
lcampanis Nov 26, 2016
1eb493a
simplified argument
lcampanis Nov 26, 2016
1588b3e
Add Month Translations to monthOptions helper
Nov 27, 2016
73561ed
updated payments styling, missing i18n
Nov 27, 2016
86d2199
object-curly-spacing lint rules applied
Nov 27, 2016
46ec4e6
Avoid localLocale.defineLocale warning
Nov 28, 2016
66a8f00
Clarify Auth.net credentials messaging
Nov 28, 2016
100bafe
Only display enabled payment methods to admin in checkout
Nov 28, 2016
ea74c21
Updated import/requires for moment
Nov 28, 2016
41aa37b
Updated translation
Nov 28, 2016
35cf759
Update styling for payment settings
Nov 28, 2016
a1bae0b
Merge pull request #1592 from reactioncommerce/package-settings
Nov 28, 2016
0e914f5
updated dep
Nov 28, 2016
4209db2
remove credentials
Nov 28, 2016
3b39769
Merged in feature-update-reaction (pull request #2)
tyler-dunkel Nov 28, 2016
c957d67
Templates fixes (#1600)
kieckhafer Dec 6, 2016
86c2056
ammended createShop function to trust cloned parent shop, introduced …
lcampanis Dec 7, 2016
14cd748
Marketplace schema, dashboard settings panel with general settings fo…
lcampanis Dec 7, 2016
12c84ec
Merge branch 'development' of https://github.com/reactioncommerce/rea…
lcampanis Dec 7, 2016
7692a0f
Use description for HTML description (#1606)
zenweasel Dec 7, 2016
2d81762
merged release 0.18
lcampanis Dec 7, 2016
46f14e5
fixed getPackageSettings func
lcampanis Dec 7, 2016
b1bb1d5
Fix permissions on Order when "guest" user (#1607)
kieckhafer Dec 7, 2016
65fb85d
Don't publish changes on a product when product is not found (happens…
zenweasel Dec 8, 2016
9cb6871
initiazize shippo's UI
prosf Dec 8, 2016
3f69ef3
Merge branch 'shippoIntegration' into reaction-421-shippo
prosf Dec 8, 2016
c7c771a
shippo ui configuration
prosf Dec 8, 2016
792a7bc
consolidated getSellerShopId into safe method shop/getSellerShopId in…
lcampanis Dec 9, 2016
95c4d74
internal review fixes
lcampanis Dec 9, 2016
e8d79f3
fix admin UI
prosf Dec 9, 2016
4e4a87c
Fix bug that causes duplicated variants to be missing images. (#1611)
mikemurray Dec 12, 2016
4317082
userDropdown now looks at route permissions, added orders perms, fixe…
lcampanis Dec 12, 2016
89d9edb
basic UI implementation with valid api key confirmation
prosf Dec 12, 2016
11803c7
cleanup,fixed several things to make a new product work for new selle…
lcampanis Dec 12, 2016
d319c58
fixed comment
lcampanis Dec 12, 2016
d282eaa
internal review fixes
lcampanis Dec 12, 2016
82e723a
multilanguage support .delete existing api key support
prosf Dec 12, 2016
817d618
Merge branch 'release-0.18.0' into reaction-421-shippo
prosf Dec 12, 2016
539107c
fix delete api key message
prosf Dec 12, 2016
b7480b5
1st pr review fixes
prosf Dec 13, 2016
5ec9d33
fix misspelling
prosf Dec 13, 2016
282d836
new seller perm, give sellers access to settings to change their shop…
lcampanis Dec 13, 2016
9395c97
Don't blank out titles (#1617)
zenweasel Dec 13, 2016
348fa57
fix browser-policy for websockets in Safari
jshimko Dec 13, 2016
c44946c
Fix for page title not updating when selecting product. (#1623)
mikemurray Dec 14, 2016
ff17146
Default product to blank object for instances where it may be undefin…
mikemurray Dec 14, 2016
6d81917
Build index immediately on startup so that search doesn't throw an er…
zenweasel Dec 15, 2016
de73a10
starting with checkout flow
prosf Dec 15, 2016
05355bd
added audience permissions to registry schema, and Reaction.Apps now …
lcampanis Dec 16, 2016
780fd28
add shippoApi Schema
prosf Dec 16, 2016
68d0ba5
Fix typo in i18n file so that error message showed key instead of tex…
zenweasel Dec 16, 2016
0bcebfb
audience is passed as an array to match any user role, excluded owner…
lcampanis Dec 17, 2016
6511167
removed shortcut fixes, clean up and comments
lcampanis Dec 17, 2016
fc527e3
reverted dropdown template
lcampanis Dec 17, 2016
f3a8a4b
reverted dropdown template
lcampanis Dec 17, 2016
30ae5a2
inernal review and cleanup
lcampanis Dec 18, 2016
b83c405
Merge branch '799-marketplace' of bitbucket.org:artlimes/reaction_com…
lcampanis Dec 18, 2016
b0ed0f1
trivial fix
prosf Dec 19, 2016
0816308
Prerender.io Integration - Feature #1249 (#1643)
Dec 20, 2016
8217a5d
Move Template editing to Sidebar (#1612)
kieckhafer Dec 20, 2016
225003b
get user and shop email for address
prosf Dec 20, 2016
29053d7
Merge pull request #1639 from reactioncommerce/1622-audience-registry…
Dec 20, 2016
b8d0df1
Merge pull request #1629 from reactioncommerce/safari-browser-policy
Dec 20, 2016
9f52b67
Fix price updates (#1633)
kieckhafer Dec 20, 2016
5146b27
Checkout discount code input (#1620)
Dec 21, 2016
fe706f0
Merge branch 'development' into release-0.18.0
zenweasel Dec 21, 2016
c0c2831
Merge branch 'release-0.18.0' into reaction-421-shippo
prosf Dec 21, 2016
0f75442
enhance shippo schema validations
prosf Dec 21, 2016
4c70a6e
update package.json with version 0.19.0
kieckhafer Dec 21, 2016
01ac135
Merge branch 'development' into release-0.18.0
prosf Dec 22, 2016
2a4f693
Merge branch 'release-0.18.0' into reaction-421-shippo
prosf Dec 22, 2016
3b4705e
added body class for current route based on theme and routeName
lcampanis Dec 22, 2016
022c9d3
minor fixes
prosf Dec 22, 2016
b25401f
PR #1655 re-merge (#1658)
kieckhafer Dec 22, 2016
d27598b
Variants without media to inherit media from their parents (#1664)
mikemurray Dec 22, 2016
ab81430
merged release 18
lcampanis Dec 23, 2016
1885513
optimised method by setting/getting session
lcampanis Dec 24, 2016
6d101e8
fixed import order
lcampanis Dec 24, 2016
ff4873d
Merged in route-theme-body-class (pull request #4)
prosf Dec 27, 2016
9228ba1
add Shippo provider from Settings to Shipping Collection.Get Active C…
prosf Dec 27, 2016
2e69144
starting..
prosf Dec 30, 2016
0c53a81
show & select shippo rates on checkout flow.update cart when editing …
prosf Dec 30, 2016
f1712c0
Merge branch 'reaction-421-shippo' into shippo-multiple-shipping-prov…
prosf Dec 30, 2016
769f498
make it more clean and secure
prosf Dec 30, 2016
db09fcf
fix multiple bugs of previous commit
prosf Dec 30, 2016
394674a
almost done
prosf Dec 30, 2016
5931cdd
removed console log from conflicts
lcampanis Jan 1, 2017
84dcb38
React no-ui Slider implementation
lcampanis Jan 1, 2017
175261e
React MultiSelect component implementation
lcampanis Jan 1, 2017
9034802
fixes of reaction-421 pr review
prosf Jan 2, 2017
7aec3ff
shippo providers are saved in different shipping documents
prosf Jan 2, 2017
e2ce517
add admin settings translation for templates (#1661)
kieckhafer Jan 3, 2017
e112601
add shipping Details in order confirmation screen and Admin order rev…
prosf Jan 4, 2017
d9bf60c
React MultiSelect component implementation (#1681)
lcampanis Jan 4, 2017
c08cd12
React no-ui Slider implementation (#1680)
lcampanis Jan 4, 2017
194767f
Route theme body class (#1672)
lcampanis Jan 4, 2017
c42bc48
seller can purchase carrier labels from shippo.He can print the label…
prosf Jan 4, 2017
05d2c56
Merged in route-theme-body-class (pull request #7)
lcampanis Jan 5, 2017
17f812a
Merged in react-multiselect-component (pull request #8)
lcampanis Jan 5, 2017
6095e25
merged release 19
lcampanis Jan 5, 2017
2d07880
Merged in react-no-ui-slider-component (pull request #5)
lcampanis Jan 5, 2017
bbea639
Merge branch 'release-0.19.0' of https://github.com/reactioncommerce/…
lcampanis Jan 5, 2017
bac3e5b
Merge branch 'release-0.19.0' of bitbucket.org:artlimes/reaction_comm…
lcampanis Jan 5, 2017
42985ad
Merge branch '799-marketplace' of bitbucket.org:artlimes/reaction_com…
lcampanis Jan 5, 2017
abde65d
clean code , fix pr issues
prosf Jan 5, 2017
33a7e93
Merge branch 'release-0.19.0' of bitbucket.org:artlimes/reaction_comm…
prosf Jan 5, 2017
ed3d510
Merge branch 'release-0.19.0' into reaction-421-shippo
prosf Jan 5, 2017
7955d68
Merge branch 'development' into release-0.19.0
mikemurray Jan 5, 2017
a6b781c
small fix
prosf Jan 5, 2017
8f77037
small form fixes
prosf Jan 5, 2017
01b9ad9
fixed create shop, now using Reaction lib instead
lcampanis Jan 5, 2017
0fe16b2
Merge branch '799-marketplace' of bitbucket.org:artlimes/reaction_com…
lcampanis Jan 5, 2017
a18affa
cleaner boundaries between shippo and shippoapi methods. JsDocs for t…
prosf Jan 9, 2017
3e5392e
make pr review fixes
prosf Jan 9, 2017
fc44220
Merge branch 'release-0.19.0' of https://github.com/reactioncommerce/…
lcampanis Jan 9, 2017
cadf722
get Registry for Current route for enabled package only
lcampanis Jan 9, 2017
e0dd0fe
Merge branch 'release-0.19.0' of bitbucket.org:artlimes/reaction_comm…
prosf Jan 9, 2017
7fdee92
Merge branch 'release-0.19.0' into reaction-421-shippo
prosf Jan 9, 2017
982fc4c
Merge branch 'development' into release-0.19.0
Jan 9, 2017
34cc06d
get rates only of enabled shipping providers
prosf Jan 9, 2017
07e656b
Merge branch 'development' into release-0.19.0
Jan 10, 2017
e499783
update shippo provider by fetching activated carriers from shippo acc…
prosf Jan 10, 2017
be55b65
small typos fixes
prosf Jan 10, 2017
d1ab807
Merge pull request #1697 from reactioncommerce/getRegistryForCurrentR…
zenweasel Jan 11, 2017
d8d7d1f
Merge branch 'release-0.19.0' of https://github.com/reactioncommerce/…
prosf Jan 12, 2017
62f928f
Merge branch 'release-0.19.0' into reaction-421-shippo
prosf Jan 12, 2017
bc1306e
a little bit more error handling
prosf Jan 12, 2017
d7498d9
Variable cleanup (#1712)
kieckhafer Jan 13, 2017
fea036c
Merge branch 'development' into release-0.19.0
kieckhafer Jan 13, 2017
fb9f6b2
Merge remote-tracking branch 'origin/release-0.19.0' into release-0.19.0
kieckhafer Jan 13, 2017
1244aaa
Merge branch 'development' into release-0.19.0
kieckhafer Jan 13, 2017
34a4584
Merge branch 'development' into release-0.19.0
kieckhafer Jan 16, 2017
222919a
Update package.json
Jan 16, 2017
1c381a6
Merge branch 'development' into release-0.19.0
kieckhafer Jan 16, 2017
2342f3c
Merge branch 'development' into release-0.19.0
kieckhafer Jan 17, 2017
0698911
Merge pull request #1618 from reactioncommerce/reaction-421-shippo
Jan 17, 2017
6816e94
Merge branch 'development' into release-0.19.0
Jan 17, 2017
06a2fbe
Merge branch 'development' into release-0.19.0
kieckhafer Jan 19, 2017
01564ff
shop settings ui
lcampanis Jan 19, 2017
886ab2f
1628 Move Toolbar & Admin View is Dashboard (#1723)
mikemurray Jan 19, 2017
2c3ecda
Merge branch 'development' into release-0.19.0
kieckhafer Jan 20, 2017
d9801af
1709 Allow users to change their default currency across the app usin…
lcampanis Jan 20, 2017
e6ebc8e
Shippo tracking status (#1735)
lcampanis Jan 20, 2017
763fd7a
Updated versions
mikemurray Jan 20, 2017
5e90d6b
Update dashboard and settings related registry entries (#1739)
mikemurray Jan 21, 2017
c5506bf
IOS / safari flex-wrap not working #1695 (#1727)
ch-lukas Jan 21, 2017
2921c02
Fix inventory notifications (#1736)
kieckhafer Jan 24, 2017
46d848e
yarn.lock
Jan 24, 2017
339e751
update viewAs to used profile saved data (#1748)
kieckhafer Jan 24, 2017
037d687
Color fix (#1750)
rymorgan Jan 25, 2017
59510a2
Silence of the Logs (#1745)
zenweasel Jan 25, 2017
f29a678
shop settings in place
lcampanis Jan 26, 2017
1dbb053
Grid View Behavior Updates (#1752)
kieckhafer Jan 26, 2017
f1ac95c
Dashboard cleanup (#1755)
mikemurray Jan 26, 2017
72d6f81
add class for not found page (#1754)
lcampanis Jan 26, 2017
ba1cf7f
fixed media permissions for brand img and pdp
lcampanis Jan 28, 2017
9c512d1
shop clean up
lcampanis Jan 28, 2017
1554d29
merged release 0.19
lcampanis Jan 28, 2017
e9a90d9
small fixes
lcampanis Jan 29, 2017
34451ad
review fixes
lcampanis Jan 29, 2017
ef64e08
fixed PDP upload and variants
lcampanis Jan 30, 2017
699f05d
review fixes
lcampanis Jan 30, 2017
b216c58
fixed getSellerShop
lcampanis Jan 30, 2017
9a8fef8
fixed comment
lcampanis Jan 30, 2017
04fcc18
Card, Button UI Updates (#1757)
mikemurray Jan 30, 2017
1158117
removed console log
lcampanis Jan 30, 2017
e636724
Simplified the new MultiSelect component (#1760)
lcampanis Jan 30, 2017
49d0690
Add tracking / shipping to emails (#1761)
kieckhafer Jan 31, 2017
7b223da
Shipping panel normalization (#1740)
Jan 31, 2017
6c1ea76
Merge branch 'development' into release-0.19.0
mikemurray Feb 1, 2017
d2df6e5
1759 Publish controls in toolbar (#1767)
mikemurray Feb 2, 2017
aab9a37
Added UI Slider onSlide event (#1774)
lcampanis Feb 2, 2017
c16fca4
fix "sold out" showing on all products with tags (#1776)
kieckhafer Feb 3, 2017
a0c732a
Fixed variants not showing up on PDP page.
Feb 3, 2017
b447753
Release Cleanup (#1769)
Feb 3, 2017
1d943fe
Merge branch 'release-0.19.0' into 799-marketplace-seller-shop-settings
mikemurray Feb 3, 2017
e21907c
Updated configure now links to open proper dashboard settings (#1777)
mikemurray Feb 6, 2017
cdc0a61
Reverse edit mode toggle functions (#1788)
kieckhafer Feb 6, 2017
c30b8fc
1782 fix navbar tags (#1789)
mikemurray Feb 7, 2017
7dcd86c
Sort dashboard apps by priority
mikemurray Feb 7, 2017
16460c9
Merge pull request #1792 from reactioncommerce/1383-dashboard-priority
Feb 7, 2017
b3dbdcf
METEOR@1.4.2.5
Feb 7, 2017
135d398
Merge branch 'release-0.19.0' into 799-marketplace-seller-shop-settings
Feb 7, 2017
dc2703a
Revert "Merge branch 'release-0.19.0' into 799-marketplace-seller-sho…
Feb 7, 2017
7f92a3f
Merge remote-tracking branch 'origin/release-0.19.0' into 799-marketp…
Feb 7, 2017
9f64feb
Merge remote-tracking branch 'origin/799-marketplace-seller-shop-sett…
Feb 7, 2017
858bcdb
Lint updates
Feb 7, 2017
ddcebd2
[marketplace-779] added stripe connect client side template.
Feb 12, 2017
f113dd0
Added basic template and js
drpears Feb 20, 2017
e6351f4
still need to fix stripe connect label in payment selection
NathanielSchmeling Feb 23, 2017
7f01043
Button and module in account profile added and click directs to test …
drpears Feb 24, 2017
acca662
changed meteor version back
NathanielSchmeling Feb 25, 2017
426f571
[marketplace 799] stripe i18n bug fix
Feb 25, 2017
9dc55fd
[tm 799] adding transaction fee settings to panel
Feb 25, 2017
a006cc1
Not sure why this file was unsaved
drpears Feb 25, 2017
e3cdfc1
Merge branch '799-marketplace-stripe-connect' into marketplace-stripe…
drpears Feb 25, 2017
c95ecc0
hackathon changes
NathanielSchmeling Feb 27, 2017
46d9301
stripe connect redirect
NathanielSchmeling Mar 4, 2017
e38f57d
Merged master into stripe-connect-redirects
NathanielSchmeling Mar 4, 2017
bddf1f1
sellerShop(s) changes
NathanielSchmeling Mar 5, 2017
97778bb
sellerShop(s) changes
NathanielSchmeling Mar 5, 2017
bc0383a
sellerShop(s) changes
NathanielSchmeling Mar 5, 2017
debfa7b
Prefill stripe connect form with seller shop data
drpears Mar 5, 2017
b5a2101
[tm 799] adding the stripe connect fees and destination to the stripe…
Mar 5, 2017
d3a19fa
spelling
Mar 5, 2017
5a9e2ae
Merged marketplace-stripe-connect-button-DP into stripe-connect-redir…
NathanielSchmeling Mar 5, 2017
4a1f241
changing router params
NathanielSchmeling Mar 5, 2017
10107e0
[tm 799] fixes for the shop url stuff
Mar 5, 2017
2eae27b
more fixes
Mar 5, 2017
6f84d9c
work in progress
NathanielSchmeling Mar 5, 2017
f4c2b4d
pulled latest changes
NathanielSchmeling Mar 5, 2017
df63e46
changed shop schema and stripe connect saving
NathanielSchmeling Mar 6, 2017
f3ab2cb
[tm 799] fixing some stuff for the methods and schema
Mar 6, 2017
5890a37
Merged in feature-tm-stripe-connect-settings (pull request #3)
tyler-dunkel Mar 6, 2017
94f1563
Merge commit 'b5a2101d2fe67b109f8d4a6b8e8eec07db0ecbca' into stripe-c…
Mar 6, 2017
8f13516
remove this
Mar 6, 2017
05ebf93
Merged in stripe-connect-redirects (pull request #4)
tyler-dunkel Mar 6, 2017
494c1ea
fixes
Mar 6, 2017
149a7c4
Merge remote-tracking branch 'upstream/marketplace-my-shops' into 799…
Mar 6, 2017
91e8c8d
fixes from merge
Mar 6, 2017
b9477aa
some fixes for merge
Mar 6, 2017
cf3c002
some of the suggested changes for pr
NathanielSchmeling Mar 7, 2017
a45239b
fixed merge issues
lcampanis Mar 7, 2017
fa5fd17
[tm 799] fixes for PR
Mar 7, 2017
d70f3b0
[tm 799] more fixes
Mar 7, 2017
680a3f3
pulled latest changes. added missing catch for try clause. readded ne…
NathanielSchmeling Mar 7, 2017
478b603
changed stripe(connect) labels
NathanielSchmeling Mar 8, 2017
fae1136
changed to working commit and readded the i18n labels
NathanielSchmeling Mar 9, 2017
0fe4063
fix
Mar 9, 2017
f97c443
[tm-799] change to allow stripe connect trans-fee to be a decimal num…
Mar 30, 2017
3035f27
Merge branch 'marketplace-my-shops' into 799-marketplace-stripe-connect
Mar 30, 2017
a0f6d3f
Merge branch 'marketplace' into 799-marketplace-stripe-connect
spencern Apr 25, 2017
cf103cc
Getting this WIP code ready to merge with marketplace feature branch
spencern Apr 26, 2017
ef7feea
Use Reaction Router in place of FlowRouter
spencern Apr 26, 2017
bcf33bf
Fix stripe tests
spencern Apr 26, 2017
4387e4e
Put sessionId back in, not sure why it got removed. Fixes Inventory H…
spencern Apr 26, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions client/modules/accounts/templates/profile/profile.html
Expand Up @@ -53,6 +53,18 @@ <h3 class="panel-title" data-i18n="marketplace.becomeSeller">Become a Seller</h3
</div>
</div>
</div>

<div class="flex-item">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title" data-i18n="marketplace.stripeConnectSignup">Start Accepting Payments</h3>
</div>

<div class="panel-content">
{{> stripeConnectSignupButton}}
</div>
</div>
</div>
{{/if}}
</div>

Expand Down
1 change: 0 additions & 1 deletion client/modules/core/main.js
Expand Up @@ -318,7 +318,6 @@ export default {
return Session.equals("admin/showActionViewDetail", true);
},


setActionView(viewData) {
if (viewData) {
let viewStack;
Expand Down
15 changes: 15 additions & 0 deletions imports/plugins/included/default-theme/client/styles/navbar.less
Expand Up @@ -110,6 +110,21 @@
}

.rui.navbar .languages .dropdown-menu {
min-width: 250px !important;
}

html:not(.rtl) .rui.navbar .languages .dropdown-menu {
left: auto !important;
right: 0px;
}

.rtl .rui.navbar .languages .dropdown-menu {
left: 0px;
right: auto !important;
}

.rui.navbar .languages .dropdown-menu,
.rui.navbar .currencies .dropdown-menu {
margin-top: 0;
min-width: 250px !important;
}
Expand Down
Expand Up @@ -347,3 +347,11 @@
right: 0px;
}
}

.product-grid-badges {
.badge {
position: absolute;
top: 0px;
right: 0px;
}
}
Expand Up @@ -1142,7 +1142,6 @@
@tag-group-border-color: @brand-primary-border-color;
@tag-group-background-color: @brand-primary-bg-light;


//== Dashboard navbar
@navbar-dashboard-bg: @white;
@navbar-dashboard-color: @black;
Expand Down
3 changes: 3 additions & 0 deletions imports/plugins/included/marketplace/client/index.js
Expand Up @@ -9,3 +9,6 @@ import "./templates/settings/sellerShopSettings.js";

import "./templates/shops/shopSelect.html";
import "./templates/shops/shopSelect.js";

import "./templates/stripeConnectSignupButton/stripeConnectSignupButton.html";
import "./templates/stripeConnectSignupButton/stripeConnectSignupButton.js";
@@ -0,0 +1,9 @@
<template name="stripeConnectSignupButton">
<button
class="btn {{classes}}"
data-event-category="marketplace"
data-event-action="button-click-stripe-signup"
data-event-label="Stripe Connect Signup button click"
data-event-value="clicked"
data-i18n="marketplace.stripeConnectSignup">Start Accepting Payments</button>
</template>
@@ -0,0 +1,47 @@
import { Meteor } from "meteor/meteor";
import { Reaction } from "/lib/api";

// TODO: This button should be a React component.

Template.stripeConnectSignupButton.onCreated(function () {
this.autorun(() => {
// TODO: this should probably be managed by a subscription?
// Seems inefficient to do it at the button component level
Meteor.subscribe("SellerShops");
});
});

// Button
Template.stripeConnectSignupButton.helpers({
/**
* Give it a size and style
* @return {String} The classes
*/
classes() {
const classes = [
(this.type || "btn-info"),
(this.size || "")
];

return classes.join(" ");
}
});

Template.stripeConnectSignupButton.events({
"click [data-event-action='button-click-stripe-signup']": function () {
const sellerShop = Reaction.getSellerShop();

const email = sellerShop.emails[0].address;
const country = sellerShop.addressBook[0].country;
const phoneNumber = sellerShop.addressBook[0].phone;
const businessName = sellerShop.addressBook[0].company;
const streetAddress = sellerShop.addressBook[0].address1;
const city = sellerShop.addressBook[0].city;
const state = sellerShop.addressBook[0].state;
const zip = sellerShop.addressBook[0].postal;

const autofillParams = `&stripe_user[email]=${email}&stripe_user[country]=${country}&stripe_user[phone_number]=${phoneNumber}&stripe_user[business_name]=${businessName}&stripe_user[street_address]=${streetAddress}&stripe_user[city]=${city}&stripe_user[state]=${state}&stripe_user[zip]=${zip}`; // eslint-disable-line max-len
// TODO: Should client_id be hardcoded in here?
window.location.href = "https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_32D88BD1qLklliziD7gYQvctJIhWBSQ7&scope=read_write" + autofillParams;
}
});
@@ -1,5 +1,6 @@
import { SimpleSchema } from "meteor/aldeed:simple-schema";
import { PackageConfig } from "/lib/collections/schemas/registry";
import { Shop } from "/lib/collections/schemas/shops.js";

export const MarketplacePackageConfig = new SimpleSchema([
PackageConfig, {
Expand All @@ -15,3 +16,15 @@ export const MarketplacePackageConfig = new SimpleSchema([
}
}
]);

/**
* Seller Shop Schema
*/
export const SellerShop = new SimpleSchema([
Shop, {
stripeConnectSettings: {
type: Object,
optional: true
}
}
]);
@@ -0,0 +1 @@
import "./settings/settings";
@@ -0,0 +1,65 @@
<template name="stripeConnectSettings">
{{#unless packageData.settings.api_key}}
<div class="alert alert-info">
<span data-i18n="admin.paymentSettings.stripeConnectSettingsDescription">Don't have a Stripe Connect API Client ID?</span>
<a href="https://dashboard.stripe.com/account/apikeys" target="_blank">
<span data-i18n="admin.paymentSettings.stripeConnectSettingsGetItHere">Get it here.</span>
</a>
</div>
{{/unless}}
<div>
{{#autoForm collection=Collections.Packages schema=StripeConnectPackageConfig doc=packageData type="update" id="stripe-connect-update-form"}}
{{>afQuickField name='settings.api_key'}}
{{>afQuickField name='settings.transactionFee.enabled'}}
{{>afQuickField name='settings.transactionFee.percentage'}}
<button type="submit" class="btn btn-primary pull-right"><span data-i18n="app.saveChanges">Save Changes</span></button>
{{/autoForm}}
</div>

</template>


<template name="stripeConnect">
<div class="container-fluid-sm flex">
<div class="flex-item">
<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-title">Stripe Connect Checkout</div>
</div>
<div class="list-group">
<div class="list-group-item">
{{#if packageData.settings.api_key}}
<span>API Client ID: <button type="button" class="btn btn-link" data-event-action="showStripeConnectSettings">**********</button></span>
{{else}}
<span>API Client ID: <button type="button" class="btn btn-link" data-event-action="showStripeConnectSettings">Configure Now</button></span>
{{/if}}
</div>
</div>
<div class="panel-footer">
<div class="left"></div>
<div class="right">

<div class="panel-footer-item">
{{#if packageData.settings.api_key}}
<i class="fa fa-check-circle fa-2x text-success"></i>
{{else}}
<i class="fa fa-minus-circle fa-2x text-muted"></i>
{{/if}}
</div>

<div class="panel-footer-item">
<button class="btn btn-default" data-event-action="showStripeConnectSettings">
<i class="fa fa-gear"></i>
</button>
</div>

</div>
</div>
</div>
</div>
</div>
</template>

<template name="stripeConnectRedirect">
<span data-i18n=“admin.redirect.stripeConnectWaitingNote>Will auto redirect in a couple seconds or click here.</span>
</template>
@@ -0,0 +1,43 @@
import { Template } from "meteor/templating";
import { Reaction, i18next, Router } from "/client/api";
import { Packages } from "/lib/collections";
import { StripeConnectPackageConfig } from "../../lib/collections/schemas";

import "./settings.html";

Template.stripeConnectSettings.helpers({
StripeConnectPackageConfig() {
return StripeConnectPackageConfig;
},
packageData() {
return Packages.findOne({
name: "reaction-stripe-connect",
shopId: Reaction.getShopId()
});
}
});

AutoForm.hooks({
"stripe-connect-update-form": {
onSuccess: function () {
return Alerts.toast(i18next.t("admin.settings.saveSuccess"), "success");
},
onError: function () {
return Alerts.toast(`${i18next.t("admin.settings.saveFailed")} ${error}`, "error");
}
}
});

Template.stripeConnectRedirect.onCreated(function () {
// TODO: Verify that this works and define steps to reproduce.
// grab stripe connects oauth values and redirect the user
const authCode = Router.getQueryParam("code");

Meteor.call("stripeConnect/saveSellerParams", Reaction.getSellerShopId(), authCode, function (err) {
if (err) {
// TODO: i18n here
Alerts.toast("There was an error with saving your seller params from stripe.");
}
Reaction.Router.go("/");
});
});
@@ -0,0 +1 @@
export * from "./stripe-connect";
@@ -0,0 +1,24 @@
import { SimpleSchema } from "meteor/aldeed:simple-schema";
import { PackageConfig } from "/lib/collections/schemas/registry";

export const StripeConnectPackageConfig = new SimpleSchema([
PackageConfig, {
"settings.mode": {
type: Boolean,
defaultValue: false
},
"settings.api_key": {
type: String,
label: "API Client ID"
},
"settings.transactionFee.enabled": {
type: Boolean,
label: "Enable Fee"
},
"settings.transactionFee.percentage": {
type: Number,
label: "Fee Percentage",
decimal: true
}
}
]);
43 changes: 43 additions & 0 deletions imports/plugins/included/payments-stripe-connect/register.js
@@ -0,0 +1,43 @@
/* eslint camelcase: 0 */
import { Reaction } from "/server/api";

Reaction.registerPackage({
label: "Stripe Connect",
name: "reaction-stripe-connect",
icon: "fa fa-cc-stripe",
autoEnable: true,
settings: {
"mode": false,
"api_key": "",
"reaction-stripe-connect": {
enabled: false
},
"stripe-redirect-url": "stripe-connect-redirect",
"transactionFee": {
enabled: false,
percentage: 0
}
},
registry: [
// Settings panel
{
label: "Stripe Connect",
provides: "paymentSettings",
container: "dashboard",
template: "stripeConnectSettings"
},

// Payment form for checkout
{
template: "stripePaymentForm",
provides: "paymentMethod",
icon: "fa fa-cc-stripe"
},

// Redirect for Stripe Connect Sign-In
{
template: "stripeConnectRedirect",
route: "/stripe-connect-redirect"
}
]
});
@@ -0,0 +1,24 @@
[{
"language": "Arabic",
"i18n": "ar",
"ns": "reaction-stripe-connect",
"translation": {
"reaction-payments": {
"admin": {
"shortcut": {
"stripeConnectLabel": "Stripe Connect"
},
"dashboard": {
"stripeConnectLabel": "Stripe Connect",
"stripeConnectDescription": "المدفوعات شريط"
},
"paymentSettings": {
"stripeConnectLabel": "Stripe Connect",
"stripeConnectSettingsLabel": "Stripe Connect",
"stripeConnectSettingsDescription": "لم يكن لديك معرف العميل الشريط API؟",
"stripeConnectSettingsGetItHere": "أحضره هنا"
}
}
}
}
}]
@@ -0,0 +1,24 @@
[{
"language": "Bulgarian",
"i18n": "bg",
"ns": "reaction-stripeConnect",
"translation": {
"reaction-payments": {
"admin": {
"shortcut": {
"stripeConnectLabel": "Stripe Connect"
},
"dashboard": {
"stripeConnectLabel": "Stripe Connect",
"stripeConnectDescription": "плащания Stripe Connect"
},
"paymentSettings": {
"stripeConnectLabel": "Stripe Connect",
"stripeConnectSettingsLabel": "Stripe Connect",
"stripeConnectSettingsDescription": "Не трябва Stripe Connect API Client ID а?",
"stripeConnectSettingsGetItHere": "Вземете го от тук"
}
}
}
}
}]