Skip to content

No notification on mobile for payment request #85

Description

@KWIZERA-CALEB

`import momo from "mtn-momo"
import { config } from "dotenv";

config()

const { Collections, Disbursements } = momo.create({
baseUrl: "https://sandbox.momodeveloper.mtn.com",
environment: "sandbox",
callbackHost: process.env.CALLBACK_HOST
});

const collections = Collections({
userSecret: process.env.USER_SECRET,
userId: process.env.USER_ID,
primaryKey: process.env.PRIMARY_KEY
});

// Request to pay
collections
.requestToPay({
amount: "50",
currency: "EUR",
externalId: "12345678",
payer: {
partyIdType: "MSISDN",
partyId: "250798205731"
},
payerMessage: "testing",
payeeNote: "hello"
})
.then(transactionId => {
console.log({ transactionId });

// Get transaction status
return collections.getTransaction(transactionId);

})
.then(transaction => {
console.log({ transaction });

// Get account balance
return collections.getBalance();

})
.then(accountBalance => console.log({ accountBalance }))
.catch(error => {
console.log(error.message);
});
`
No response for this

PS C:\Users\kwize\Projects\Dream-city\backend> node payments.js
{ transactionId: '90fab171-a8f9-4713-8283-1eacfbd3dcda' }
{
transaction: {
financialTransactionId: '1927264368',
externalId: '12345678',
amount: '50',
currency: 'EUR',
payer: { partyIdType: 'MSISDN', partyId: '250798205731' },
payerMessage: 'testing',
payeeNote: 'hello',
status: 'SUCCESSFUL'
}
}
Service temporarily unavailable, try again later.
PS C:\Users\kwize\Projects\Dream-city\backend>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions