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

Create Subscription issue. #21

Open
CrackerakiUA opened this issue Oct 12, 2016 · 1 comment
Open

Create Subscription issue. #21

CrackerakiUA opened this issue Oct 12, 2016 · 1 comment

Comments

@CrackerakiUA
Copy link

I have issues couple of functions and now i need to create subscription, i am getting error:

{ Error: interval,currency,amount
    at IncomingMessage.<anonymous> (C:\Work\UpWork\Indrek Pihor\SmartManage\node_modules\paymill-node\lib\main.js:97:21)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
  response:
   { exception: 'Api_Exception_InvalidParameter',
     error: 'interval,currency,amount' } }

Code i am using:

paymill.subscriptions.create({
  client: clients.data[0].id,
  payment: payment.data.id,
  interval: 'MONTH',
  currency: 'EUR',
  amount: '1000'
}, function(err, subscription) {
  console.log('err');
  console.log(err);
  console.log('subscription');
  console.log(subscription);
  // if(err) callback(false);
  // else callback(subscription.data);
});

Object which is passing to create function:

{ client: 'client_e37a84dc81e810e54ea9',
  payment: 'pay_3b4aee5a016ca07ff739b4c6',
  interval: 'MONTH',
  currency: 'EUR',
  amount: 1000 }
@thomaschaaf
Copy link
Member

Please try https://github.com/paymill/paymill-js I am not using payroll anymore. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants