0.1.2 • Published 2 years ago

amwal v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Amwal

This is the sdk for Tutoruu's main payment gateway - amwal.

Installation

npm i amwal #npm
pnpm i amwal #pnpm
yarn add amwal #yarn

Usage

import amwal from 'amwal';

Authentication

amwal.authenticate('<User Token>');

User

amwal.getUser();

Subscription Items

(No authentication required)

amwal.getSubscriptionItems();

amwal.getSubscriptionItem('<SubscriptionItemId>');

Subscriptions

amwal.getSubscriptions();

amwal.getSubscription('<SubscriptionId>');

amwal.subscribe('<SubscriptionItemId>');

amwal.unsubscribe('<SubscriptionId>');

Payments

amwal.getPayments();

amwal.getPayment('<PaymentId>');

Payment with Reference Number

amwal.payRefNum({
    amount: 200.00,
    description: "Two Sessions in ECON305",
    items: [
        {
            itemId: "12",
            quantity: 2,
            price: 100.00
            description: "Session in ECON305"
        }
    ]
});

Direct Payment

amwal.pay({
    amount: 200.00,
    description: "Two Sessions in ECON305",
    items: [
        {
            itemId: "12",
            quantity: 2,
            price: 100.00
            description: "Session in ECON305"
        }
    ],
    cvv: 123
});

Auth Capture Method

amwal.authorizePayment({
    amount: 200.00,
    description: "Two Sessions in ECON305",
    items: [
        {
            itemId: "12",
            quantity: 2,
            price: 100.00
            description: "Session in ECON305"
        }
    ],
    cvv: 123
});

amwal.capturePayment("<PaymentId>")");

Cards

amwal.getCards();

amwal.getCard("<CardId>");

amwal.createCard({
    cardNumber: 200020002000
    cardAlias: "Hamada Yel3ab",
    expiryYear: "24",
    expiryMonth: "05",
    cvv: 123
});

amwal.setDefaultCard("<CardId>");

amwal.removeCard("<CardId>")
0.0.10

2 years ago

0.0.11

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

1.0.0

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago