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