Payment packages?
Just an idear:
Could be nice with some smart packages for paypal etc. for easier integration with payment gateways. (somewhat like the accounts)
Eg. with a std. template/handlebar helper for the input form {{paymentForm "cssPrefix"}}
Maybe som initial credentials:
Payment.config({
'paypal' : {
user: '',
password: '',
signature: '',
onPayment: '',
inProduction: false //eg. use the sandbox
}
});
//Customizing the form - rough idear
Payment.addFormField('Custommer type', ['a', 'b', 'c']); //generates option
Payment.addFormField('Comment', '', 'Write your comment here'); //generates textfields
Controller something like:
'click .btnAddItem': function(e, temp) {
Payment.basket.addItem(2, 'Item name', 16.84, 'USD');
}
'click .btnMakePayment': function(e, temp) {
Payment.make(basket, Meteor.userId());
//Show form
}
A handlebar helper for populating the basket:
{{#each paymentBasket}}
{{{amountButton}}} - {{itemName}} {{price}} = {{sumPrice}} {{{deleteButton}}}<br/>
{{else}}
No items in basket
{{/each}}
{{#with paymentTotals}}
Shipping {{shipping}}<br/>
Tax {{tax}}<br/>
<b>Sum {{sum}}</b><br/>
<button class="btn btnMakePayment">Buy</button>
{{/with}}
Anybody wanna team up?
I probably don't have time to work on this, but stripe might be a natural fit.
there's a stripe one already https://atmosphere.meteor.com/package/stripe For stripe however you need to be in the US or Canada last time I checked. The overall idea of payment packages is great nonetheless...
Oh, nice. Thanks for the heads up.
I see two things here:
- Payment API integration (Stripe, Paypal, Balanced..)
- A shopping cart module, build on the previous, that handle business logic like baskets and tax calculation (itself a very tricky issue.)
These are both great ideas and I'd love to see them in Meteor. The core team won't be getting to it anytime soon (too much to do for 1.0!) but I know they would be useful to many people. It would be better to look for collaborators on meteor-talk, which will reach a larger audience than a GitHub issue :)