JS client for browser to perform mobile payment operation with MeSomb
npm install @hachther/mesomb> JavaScript client for mobile payment (Orange Money, Mobile Money ...) with MeSomb services.
>
> You can check the full documentation of the api here
``sh`
yarn add @hachther/mesombor
npm install @hachther/mesomb
Check the full documentation here
Below some quick examples
`JavaScript
import {PaymentOperation, RandomGenerator} from '@hachther/mesomb';
// or Modular import
// const {PaymentOperation} = require('@hachther/mesomb');
const applicationKey = '
const accessKey = '
const secretKey = '
const client = new PaymentOperation({applicationKey, accessKey, secretKey});
const response = await client.makeCollect({
payer: '670000000',
amount: 10000,
service: 'MTN',
country: 'CM',
currency: 'XAF',
customer: {
email: 'email@gmail.com',
firstName: 'Dan',
lastName: 'Fisher',
town: 'Douala',
region: 'Littoral',
country: 'CM',
address: 'Bepanda',
},
location: {town: 'Douala', region: 'Littoral', country: 'CM'},
products: [
{name: 'Sac a Main SM', category: 'Sac a Main', quantity: 1, amount: 10000}
],
});
`
`JavaScript
import {PaymentOperation} from '@hachther/mesomb';
// Modular import
// const {PaymentOperation} = require('@hachther/mesomb');
const applicationKey = '
const accessKey = '
const secretKey = '
const client = new PaymentOperation({applicationKey, accessKey, secretKey});
const response = await client.makeDeposit({
receiver: '670000000',
amount: 10000,
service: 'MTN',
country: 'CM',
currency: 'XAF',
customer: {
email: 'email@gmail.com',
first_name: 'Dan',
last_name: 'Fisher',
town: 'Douala',
region: 'Littoral',
country: 'CM',
address: 'Bepanda',
},
location: {town: 'Douala', region: 'Littoral', country: 'CM'},
products: [
{name: 'Sac a Main SM', category: 'Sac a Main', quantity: 1, 'amount': 10000}
],
});
response.isOperationSuccess()
response.isTransactionSuccess()
`
`JavaScript
import {PaymentOperation} from '@hachther/mesomb';
// Modular import
// const {PaymentOperation} = require('@hachther/mesomb');
const payment = new PaymentOperation({applicationKey: '
const application = await payment.getStatus();
console.log(application);
`
`JavaScript
import {PaymentOperation} from '@hachther/mesomb';
// Modular import
// const {PaymentOperation} = require('@hachther/mesomb');
const applicationKey = '
const accessKey = '
const secretKey = '
const client = new PaymentOperation({applicationKey, accessKey, secretKey});
const transactions = await client.getTransactions(['a483a9e8-51d7-44c9-875b-1305b1801274']);
console.log(transactions)
``
š¤ Hachther LLC
* Website: https://www.hachther.com
* Twitter: @hachther
* Github: @hachther
* LinkedIn: @hachther
Give a āļø if this project helped you!