Commit 83d8ec2a authored by Marius Trautrims's avatar Marius Trautrims

Fiy update paymet methods and remove loggings

parent 57f74956
# Changelog
## 3.0
Implementation of a backend and sales platform
#### Features
* Different roles
* Admin Panel with dashboard
* Report user or cardsets
* Ban users
* Notifications
* Introduction of billing plans
* New cardset types
* Benefits for students and lecturer
* Sell and pay cardsets
* Learn verified cardsets
* Braintree integration
* Choose creative commons license for your cardset
#### UX
* Better overview in pool and cardset view
* Show alteration date of a cardset
* Clean navbar
* Reorder profile view
#### Bugfixes
* i18n
## 2.1.0
Migration of THMcards to Meteor 1.3
......@@ -8,21 +35,21 @@ Migration of THMcards to Meteor 1.3
* Implementation of GitLab CI
#### UX
* Corporate design for welcome and impressum page
* Corporate design for welcome and imprint page
#### Bugfixes
* Changed sass to scss
* Update package to fix routing
* Fixed CAS login
* Fixed end screen of SuperMemo
* Fixed end screen of SuperMemo
## 2.0.0
Reimplementation of THMcards with the Meteor Framework
#### Features
* Responsive design
* Form Validation
* Responsive design
* Form Validation
#### Bugfixes
* Added new routing system
......@@ -70,4 +97,4 @@ First version including the main features:
Created with:
* Backbone and Marionette
\ No newline at end of file
* Backbone and Marionette
......@@ -62,9 +62,9 @@ Meteor.methods({
Meteor.call('btCreateCustomer', nonceFromTheClient, function(error, btCustomer){
if (error) {
console.log(error);
btUpdatePayment.return(error);
} else {
var customerId = '';
var customerId;
if (btCustomer === undefined) {
customerId = Meteor.user().customerId;
} else {
......@@ -72,7 +72,7 @@ Meteor.methods({
}
gateway.paymentMethod.create({
customerId: user.customerId,
customerId: customerId,
paymentMethodNonce: nonceFromTheClient,
options: {
makeDefault: true
......@@ -91,7 +91,6 @@ Meteor.methods({
},
btCreateTransaction: function(nonceFromTheClient, cardset_id) {
var user = Meteor.users.findOne(this.userId);
var cardset = Cardsets.findOne(cardset_id);
var btCreateTransaction = new Future();
......@@ -99,9 +98,9 @@ Meteor.methods({
// Create our customer.
Meteor.call('btCreateCustomer', nonceFromTheClient, function(error, btCustomer){
if (error) {
console.log(error);
btCreateTransaction.return(error);
} else {
var customerId = '';
var customerId;
if (btCustomer === undefined) {
customerId = Meteor.user().customerId;
} else {
......@@ -139,9 +138,9 @@ Meteor.methods({
// Create our customer.
Meteor.call('btCreateCustomer', nonceFromTheClient, function(error, btCustomer){
if (error) {
console.log(error);
btCreateCredit.return(error);
} else {
var customerId = '';
var customerId;
if (btCustomer === undefined) {
customerId = Meteor.user().customerId;
} else {
......@@ -177,9 +176,9 @@ Meteor.methods({
// Create our customer.
Meteor.call('btCreateCustomer', nonce, function(error, btCustomer){
if (error) {
console.log(error);
thisCustomer.return(error);
} else {
var customerId = '';
var customerId;
if (btCustomer === undefined) {
customerId = Meteor.user().customerId;
} else {
......@@ -189,7 +188,7 @@ Meteor.methods({
// Setup a subscription for our customer.
Meteor.call('btCreateSubscription', customerId, plan, function(error, response){
if (error) {
console.log(error);
thisCustomer.return(error);
} else {
try {
var customerSubscription = {
......@@ -207,7 +206,7 @@ Meteor.methods({
$set: customerSubscription
}, function(error, response){
if (error){
console.log(error);
thisCustomer.return(error);
} else {
// Once the subscription data has been added, return to Future.
thisCustomer.return(Meteor.user());
......@@ -273,7 +272,6 @@ Meteor.methods({
},
btFindCustomer: function(customerId) {
//check(customerId, String);
var btCustomer = new Future();
gateway.customer.find(customerId, function(error, result) {
......@@ -288,8 +286,6 @@ Meteor.methods({
},
btCreateSubscription: function(customerId, plan) {
//check(customerId, String);
//check(plan, String);
var btSubscription = new Future();
// fetch customer data.
......@@ -317,7 +313,6 @@ Meteor.methods({
},
btFindUserSubscription: function(customerId) {
//check(customerId, String);
var btUserSubscription = new Future();
// find customer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment