sparkplug / momoapi-node

MTN MoMo API Client for Node
https://www.npmjs.com/package/mtn-momo
MIT License
59 stars 47 forks source link

What should i expect when i run `npm run start:dev`? #5

Closed raybesiga closed 5 years ago

raybesiga commented 5 years ago

When i run npm run start:dev, I get the following output:

> momoapi-client@0.0.1 start:dev /Users/raybesiga/Projects/momoapi-node
> nodemon

[nodemon] 1.18.6
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /Users/raybesiga/Projects/momoapi-node/src/**/*
[nodemon] starting `ts-node src/main.ts`

{ message: 'Duplicated reference id. Creation of resource failed.',
  code: 'RESOURCE_ALREADY_EXIST' }
{ financialTransactionId: '1421731323',
  externalId: 'string',
  amount: '2000',
  currency: 'EUR',
  payer: { partyIdType: 'MSISDN', partyId: '256778702721' },
  payerMessage: 'string',
  payeeNote: 'string',
  status: 'SUCCESSFUL' }
[nodemon] clean exit - waiting for changes before restart

Is this the expected response @Kaminto ?

Kaminto commented 5 years ago

Yes its. @raybesiga
When you run npm run start:dev requestToPay and getBalance functions are run automatically.

However in another use case we would use the command line interaction like in the python wrapper.

raybesiga commented 5 years ago

Interesting @Kaminto. Are the parameters hard coded? Also @mossplix any thoughts about this?

Kaminto commented 5 years ago

Yes @raybesiga Parameters are hard coded in the functions. In this use case i assume a developer is going to use to plug it in there code. However i can add a script for command line interactions. For training purposes.