Git Product home page Git Product logo

saas-stripe's Introduction

saas-stripe's People

Contributors

rglover avatar themeteorchef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

saas-stripe's Issues

Quite a few errors on build

Hello

I'm new to programming so, most likely, there is an easy fix to my issue. When I run the application it throws various errors. I've stepped through the code and tried to trouble shoot it. I'm not having any luck.

Any idea why these errors being thrown ?

=> Started proxy.
=> Started MongoDB.
W20150516-19:34:55.524(-4)? (STDERR)
W20150516-19:34:55.527(-4)? (STDERR) /Users/a/.meteor/packages/meteor-tool/.1.1.3.e283c0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20150516-19:34:55.527(-4)? (STDERR) throw(ex);
W20150516-19:34:55.527(-4)? (STDERR) ^
W20150516-19:34:55.527(-4)? (STDERR) TypeError: Cannot read property 'stripe' of undefined
W20150516-19:34:55.528(-4)? (STDERR) at app/server/methods/stripe.js:17:37
W20150516-19:34:55.528(-4)? (STDERR) at app/server/methods/stripe.js:328:3
W20150516-19:34:55.528(-4)? (STDERR) at /Users/saas-stripe-master/code/.meteor/local/build/programs/server/boot.js:222:10
W20150516-19:34:55.528(-4)? (STDERR) at Array.forEach (native)
W20150516-19:34:55.528(-4)? (STDERR) at Function..each..forEach (/Users/a/.meteor/packages/meteor-tool/.1.1.3.e283c0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20150516-19:34:55.529(-4)? (STDERR) at /Users/saas-stripe-master/code/.meteor/local/build/programs/server/boot.js:117:5
=> Exited with code: 8

Signup w/ Credit Card

Derp. Forgot to include a way to have user's create a credit card in the UI. Need to wire the CC form up to the Signup page so we can have a "paid trial" example.

Match Error when trying to subscribe (Similar to John Whittlestone, 20 March 2015)

Hi Ryan,

Thanks for your hard work!

I am trying to get your Stripe Integration app up and running before I implement it in my own app - I have literally downloaded your code and entered my own stripe keys in settings.json.

I am trying to run it on localhost and I get the following error on the server:

[Error: Match error: Expected string, got undefined] message: 'Match error: Expected string, got undefined', path: '', sanitizedError: { [Error: Match failed [400]] error: 400, reason: 'Match failed',

Note that I can see the attempted subscription in my Stripe dashboard:

Parsed Request POST Body

key: "pk_test_KrknQHSDnW94DiWgfyIrxH5A"
payment_user_agent: "stripe.js/c180728"
card:
number: "*********_4242"
exp_month: "12"
exp_year: "2019"
cvc: "
_"

Response body

id: tok_17XuwWKApgpveqnDPOlOQJCs
object: "token"
card:
id: card_17XuwWKApgpveqnD2RXI5C7e
object: "card"
address_city: null
address_country: null
address_line1: null
address_line1_check: null
address_line2: null
address_state: null
address_zip: null
address_zip_check: null
brand: "Visa"
country: "US"
cvc_check: "unchecked"
dynamic_last4: null
exp_month: 12
exp_year: 2019
funding: "credit"
last4: "4242"
metadata:
name: null
tokenization_method: null
client_ip: "80.169.142.78"
created: 1453907448
livemode: false
type: "card"
used: false

I have also deployed to Galaxy with an SSL cert and the same thing seems to be happening you can see it at https://www.properorder.co.uk

Both instances seem to be freezing on the "Setting up your trial..." button

Have you any idea what could be causing this? As I said the only change on the localhost is to the keys in settings.json. And the rest of the app seems to be working fine.

Many thanks in advance.

Brian

Base version mismatch

I will start by saying that this is the best tutorial I've found on Stripe integration (that may actually be easy to port to other payment gateways like Braintree). It is very complete and easy to follow.

When Meteor was updated to 1.2, TMC updated Base to 3.0, which changed the structure a bit. A few examples are views and controllers to templates folder. The most important, being the use of ES2015.

This tutorial is still in 1.11 or something, so the versions of the Base repo don't match. It is still easy to follow, changing a little bit the code and location of files, however the question is ¿will you update this tutorial to support Base 3.0, and Meteor 1.2?

Best regards

Polish signup flow

There are a few details that could be better about the signup flow. Specifically, I want to handle state on the signup form while we wait for Stripe as well as improve how data is being displayed in the dashboard.

Demo not working in Safari/FF

When putting in an email that has already signed up meteor is not throwing the error back to the client. Meaning no alert or button reset. Works fine in chrome. Duplicated behavior locally too.

Payment Methods

Once Stripe is installed, will need to wire up methods for:

  • Creating a new card (token)
  • Updating an existing card
  • Creating a customer
  • Creating a subscription
  • Updating a subscription
  • Applying a coupon code
  • Creating an invoice (via Webhook, insert into DB)
  • Sending an invoice to a customer via email

Navbar Toggle doesn't work

When you size down the navbar, the menu won't toggle. The problem is that there was no ID defined.

/client/includes/_header.html on line 13.

The current code reads:
div class="collapse navbar-collapse

div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"

Todo lists

  • Add a collection for todo lists (just lists, not items)
  • Add a method for inserting todo lists on the server
  • Add a method for deleting todo lists on the server
  • Add an event for deleting todo lsits on the client
  • Add an event for inserting todo lists on the client
  • Update method for inserting todo lists on the server to include quota validation against plan limits

Global Subscription Data

  • Setup a global JS object that contains pricing information (accessible on the server, published to client)
  • Wire up all templates that reference plans/pricing to global object

sanitizedError when signing up

Hi,

Thanks for your work on this, 75% of the way through part one and already I've learned so much.

I've pulled the repo down and when I sign up, I am unable to get the following:

{ [Error: Match error: Expected string, got undefined]
I20150320-08:11:53.298(0)?   message: 'Match error: Expected string, got undefined',
I20150320-08:11:53.298(0)?   path: '',
I20150320-08:11:53.298(0)?   sanitizedError: 
I20150320-08:11:53.299(0)?    { [Error: Match failed [400]]
I20150320-08:11:53.299(0)?      error: 400,
I20150320-08:11:53.299(0)?      reason: 'Match failed',
I20150320-08:11:53.299(0)?      details: undefined,
I20150320-08:11:53.299(0)?      message: 'Match failed [400]',
I20150320-08:11:53.299(0)?      errorType: 'Meteor.Error' },
I20150320-08:11:53.299(0)?   errorType: 'Match.Error' }

And the screen doesn't progress. Any ideas?

I've signed up to Stripe (and verified my account), inputted the plans to the dashboard. I noted the other issue about a new API version but I'm assuming that's not the issue?

Any ideas appreciated, thanks.

Jon.

Issue when adding user / subscribing

I get the following error when trying to add a user via stripe. They keys are set, the plans are created with the same ids / names.

I20150523-23:11:46.270(3)? Exception while invoking method 'checkUserQuota' TypeError: Cannot read property 'plan' of undefined
I20150523-23:11:46.270(3)? at [object Object].Meteor.methods.checkUserQuota (app/server/methods/data/read/users.js:14:44)
I20150523-23:11:46.270(3)? at packages/check/match.js:109:1
I20150523-23:11:46.271(3)? at [object Object]..extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:11:46.271(3)? at Object.Match.failIfArgumentsAreNotAllChecked (packages/check/match.js:108:1)
I20150523-23:11:46.271(3)? at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1614:1)
I20150523-23:11:46.271(3)? at .extend.protocol_handlers.method.exception (packages/ddp/livedata_server.js:648:1)
I20150523-23:11:46.271(3)? at [object Object].
.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:11:46.272(3)? at packages/ddp/livedata_server.js:647:1
I20150523-23:11:46.272(3)? at [object Object].
.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:11:46.272(3)? at [object Object].
.extend.protocol_handlers.method (packages/ddp/livedata_server.js:646:1)
I20150523-23:11:46.277(3)? Exception while invoking method 'checkUserQuota' TypeError: Cannot read property 'plan' of undefined
I20150523-23:11:46.277(3)? at [object Object].Meteor.methods.checkUserQuota (app/server/methods/data/read/users.js:14:44)
I20150523-23:11:46.277(3)? at packages/check/match.js:109:1
I20150523-23:11:46.278(3)? at [object Object]..extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:11:46.278(3)? at Object.Match.failIfArgumentsAreNotAllChecked (packages/check/match.js:108:1)
I20150523-23:11:46.278(3)? at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1614:1)
I20150523-23:11:46.278(3)? at .extend.protocol_handlers.method.exception (packages/ddp/livedata_server.js:648:1)
I20150523-23:11:46.279(3)? at [object Object].
.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:11:46.279(3)? at packages/ddp/livedata_server.js:647:1
I20150523-23:11:46.279(3)? at [object Object].
.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:11:46.279(3)? at [object Object].
.extend.protocol_handlers.method (packages/ddp/livedata_server.js:646:1)
I20150523-23:11:46.283(3)? Exception while invoking method 'checkUserPlan' TypeError: Cannot read property 'plan' of undefined
I20150523-23:11:46.283(3)? at app/server/methods/data/read/users.js:42:97
I20150523-23:11:46.284(3)? at .find..detect (packages/underscore/underscore.js:184:1)
I20150523-23:11:46.284(3)? at Array.some (native)
I20150523-23:11:46.284(3)? at .some..any (packages/underscore/underscore.js:233:1)
I20150523-23:11:46.284(3)? at Function..find..detect (packages/underscore/underscore.js:183:1)
I20150523-23:11:46.284(3)? at [object Object].Meteor.methods.checkUserPlan (app/server/methods/data/read/users.js:42:28)
I20150523-23:11:46.284(3)? at packages/check/match.js:109:1
I20150523-23:11:46.284(3)? at [object Object]..extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:11:46.285(3)? at Object.Match.failIfArgumentsAreNotAllChecked (packages/check/match.js:108:1)
I20150523-23:11:46.285(3)? at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1614:1)
I20150523-23:11:46.286(3)? Exception while invoking method 'checkUserPlan' TypeError: Cannot read property 'plan' of undefined
I20150523-23:11:46.286(3)? at app/server/methods/data/read/users.js:42:97
I20150523-23:11:46.286(3)? at .find..detect (packages/underscore/underscore.js:184:1)
I20150523-23:11:46.286(3)? at Array.some (native)
I20150523-23:11:46.286(3)? at .some..any (packages/underscore/underscore.js:233:1)
I20150523-23:11:46.287(3)? at Function.
.find.
.detect (packages/underscore/underscore.js:183:1)
I20150523-23:11:46.287(3)? at [object Object].Meteor.methods.checkUserPlan (app/server/methods/data/read/users.js:42:28)
I20150523-23:11:46.287(3)? at packages/check/match.js:109:1
I20150523-23:11:46.287(3)? at [object Object]..extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:11:46.287(3)? at Object.Match.failIfArgumentsAreNotAllChecked (packages/check/match.js:108:1)
I20150523-23:11:46.287(3)? at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1614:1)
I20150523-23:13:13.495(3)? Exception while invoking method 'checkUserQuota' TypeError: Cannot read property 'plan' of undefined
I20150523-23:13:13.495(3)? at [object Object].Meteor.methods.checkUserQuota (app/server/methods/data/read/users.js:14:44)
I20150523-23:13:13.496(3)? at packages/check/match.js:109:1
I20150523-23:13:13.496(3)? at [object Object].
.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:13:13.496(3)? at Object.Match.failIfArgumentsAreNotAllChecked (packages/check/match.js:108:1)
I20150523-23:13:13.496(3)? at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1614:1)
I20150523-23:13:13.496(3)? at .extend.protocol_handlers.method.exception (packages/ddp/livedata_server.js:648:1)
I20150523-23:13:13.496(3)? at [object Object].
.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:13:13.496(3)? at packages/ddp/livedata_server.js:647:1
I20150523-23:13:13.497(3)? at [object Object].
.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:13:13.498(3)? at [object Object].
.extend.protocol_handlers.method (packages/ddp/livedata_server.js:646:1)
I20150523-23:13:13.500(3)? Exception while invoking method 'checkUserQuota' TypeError: Cannot read property 'plan' of undefined
I20150523-23:13:13.501(3)? at [object Object].Meteor.methods.checkUserQuota (app/server/methods/data/read/users.js:14:44)
I20150523-23:13:13.501(3)? at packages/check/match.js:109:1
I20150523-23:13:13.501(3)? at [object Object]..extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:13:13.501(3)? at Object.Match.failIfArgumentsAreNotAllChecked (packages/check/match.js:108:1)
I20150523-23:13:13.501(3)? at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1614:1)
I20150523-23:13:13.502(3)? at .extend.protocol_handlers.method.exception (packages/ddp/livedata_server.js:648:1)
I20150523-23:13:13.502(3)? at [object Object].
.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:13:13.502(3)? at packages/ddp/livedata_server.js:647:1
I20150523-23:13:13.502(3)? at [object Object].
.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:13:13.502(3)? at [object Object].
.extend.protocol_handlers.method (packages/ddp/livedata_server.js:646:1)
I20150523-23:13:13.504(3)? Exception while invoking method 'checkUserPlan' TypeError: Cannot read property 'plan' of undefined
I20150523-23:13:13.504(3)? at app/server/methods/data/read/users.js:42:97
I20150523-23:13:13.505(3)? at .find..detect (packages/underscore/underscore.js:184:1)
I20150523-23:13:13.505(3)? at Array.some (native)
I20150523-23:13:13.505(3)? at .some..any (packages/underscore/underscore.js:233:1)
I20150523-23:13:13.505(3)? at Function..find..detect (packages/underscore/underscore.js:183:1)
I20150523-23:13:13.505(3)? at [object Object].Meteor.methods.checkUserPlan (app/server/methods/data/read/users.js:42:28)
I20150523-23:13:13.505(3)? at packages/check/match.js:109:1
I20150523-23:13:13.505(3)? at [object Object]..extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:13:13.505(3)? at Object.Match.failIfArgumentsAreNotAllChecked (packages/check/match.js:108:1)
I20150523-23:13:13.505(3)? at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1614:1)
I20150523-23:13:13.506(3)? Exception while invoking method 'checkUserPlan' TypeError: Cannot read property 'plan' of undefined
I20150523-23:13:13.506(3)? at app/server/methods/data/read/users.js:42:97
I20150523-23:13:13.506(3)? at .find..detect (packages/underscore/underscore.js:184:1)
I20150523-23:13:13.507(3)? at Array.some (native)
I20150523-23:13:13.507(3)? at .some..any (packages/underscore/underscore.js:233:1)
I20150523-23:13:13.508(3)? at Function.
.find.
.detect (packages/underscore/underscore.js:183:1)
I20150523-23:13:13.508(3)? at [object Object].Meteor.methods.checkUserPlan (app/server/methods/data/read/users.js:42:28)
I20150523-23:13:13.508(3)? at packages/check/match.js:109:1
I20150523-23:13:13.508(3)? at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150523-23:13:13.508(3)? at Object.Match._failIfArgumentsAreNotAllChecked (packages/check/match.js:108:1)
I20150523-23:13:13.509(3)? at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1614:1)

This causes some nasty errors client side(internal server error alerts - 4 of them) and doesn't update the subscription plan.

From what I could find, there's a problem in server/methods/signup.js near line 70. I tried running a console.log after the subscription variable is defined, but it doesn't work. Also, in the database, the subscription information are not filled in.

I've put it live at http://saastest.meteor.com/ and githubbed at https://github.com/danvoinea/meteor-saas.
The only thing I added was houston:admin, but I also tried without it.

How can I debug this? Thank you!

Add note about settings.json

I left out a mention of using meteor --settings settings.json which is leading to readers getting stuck on Meteor not being able to find the user's Stripe token.

Wrong cents amount for plans in settings.json

Whoops. Currently charging $50 for what should be a $5 plan and $200 for a $20 plan.

PSA: check your math! Twice!

Note: this only applies to the internal settings, as we've specified the correct amounts in the Stripe dashboard. So, customers would be getting charged the correct amount. Still not bueno.

Responsive meta tag

The demo is missing the <meta> tag for adjusting the viewport, causing it to scale like a desktop site on mobile devices.

<meta name="viewport" content="width=device-width, initial-scale=1">

Errors prevented startup

I cloned the project and installed npm dependencies. When tried to run the app, this error occured.

=> Started proxy.
=> Meteor 1.4.4.1 is available. Update this project with 'meteor update'.
=> Started MongoDB.
=> Errors prevented startup:

   While checking for particle4dev:[email protected]:
   error: No compatible binary build found for this package. Contact the package author and ask them to publish it for your platform.

=> Your application has errors. Waiting for file change.

Stripe API Mismatch

Thanks to Matt McClard for reporting this.

Stripe's API was updated shortly after the release of Part 1, introducing some breaking changes. The version of the API on both the demo and in the source code for this recipe are 2015-01-11. The latest version of the Stripe API is 2015-02-18.

Note: Stripe will work if you set the API version in your Dashboard to the one equal to the version in the recipe. If you update, however, note the following change that Matt reported:

The card attribute is no longer returned on Charges. You should now use the source attribute instead.
— via Stripe Changelog

Via Matt, if you run into snags you can make the following changes:

Ok I was looking and it looks like "cards" isn't an object in the subscription object.

card: {
  type: stripeCustomer.cards.data[0].brand,
  lastFour: stripeCustomer.cards.data[0].last4
}

So I replaced it with sources, which seems to work.

card: {
  type: stripeCustomer.sources.data[0].brand,
  lastFour: stripeCustomer.sources.data[0].last4
}

Recover Password Error

I get the following error when trying to recover my password:

App running at: http://localhost:3000/
I20160522-10:05:31.117(-7)? Exception while invoking method 'forgotPassword' TypeError: Property 'from' of object [object Object] is not a function
I20160522-10:05:31.118(-7)? at AccountsServer.Accounts.sendResetPasswordEmail (packages/accounts-password/password_server.js:559:47)
I20160522-10:05:31.118(-7)? at [object Object].forgotPassword (packages/accounts-password/password_server.js:516:12)
I20160522-10:05:31.118(-7)? at packages/check/match.js:107:1
I20160522-10:05:31.118(-7)? at [object Object]..extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160522-10:05:31.119(-7)? at Object.exports.Match.failIfArgumentsAreNotAllChecked (packages/check/match.js:106:1)
I20160522-10:05:31.119(-7)? at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1701:18)
I20160522-10:05:31.119(-7)? at packages/ddp-server/livedata_server.js:711:19
I20160522-10:05:31.119(-7)? at [object Object].
.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160522-10:05:31.119(-7)? at packages/ddp-server/livedata_server.js:709:40
I20160522-10:05:31.119(-7)? at [object Object].
.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160522-10:05:31.119(-7)? at packages/ddp-server/livedata_server.js:707:46
I20160522-10:05:31.119(-7)? at tryCallTwo (/Users/bryansaltzman/.meteor/packages/promise/.0.6.7.3uaxbz++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:45:5)
I20160522-10:05:31.120(-7)? at doResolve (/Users/bryansaltzman/.meteor/packages/promise/.0.6.7.3uaxbz++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:200:13)
I20160522-10:05:31.120(-7)? at new Promise (/Users/bryansaltzman/.meteor/packages/promise/.0.6.7.3uaxbz++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:66:3)
I20160522-10:05:31.120(-7)? at Session.method (packages/ddp-server/livedata_server.js:681:23)
I20160522-10:05:31.120(-7)? at packages/ddp-server/livedata_server.js:551:43

Not sure where to start.

[ReferenceError: Future is not defined]

After going through part 1, Im getting this error from the server console.
I'm using 1.3 beta. could this be the problem? or am i missing something?
thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.