1.1.4 • Published 3 years ago

@404-software/credimax v1.1.4

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

About

This package helps in generating a Credimax (Bahrain) payment session using a link that can be passed to the user to pay using Credimax's hosted session.

API VERSION: 70

How to use

1- you can set the following environment variables:

CREDIMAX_SHOP_NAME="Shop name"
CREDIMAX_RETURN_URL="Website's return URL"
CREDIMAX_CANCEL_URL="Website's cancel URL"
CREDIMAX_MERCHANT_ID="Merchant ID"
CREDIMAX_API_PASSWORD="API Password"

alternatively, you can pass these details to the config of the function directly mentioned in the next step. 2- You need to pass the following object to the function:

{
  order: {
    id: string | number
    total: string | number
    currency?: 'BHD' | 'USD'
    description?: string
  },
  address: {
	  country: 'BHR' | 'USA' | 'SAU' | 'ARE' | 'KWT' | 'OMN' | 'QAT'
    city: string
    street?: string
  },
  config: { //ONLY if not using environment variables
    credentials?: {
      id?: string
      password?: string
    }
    urls?: {
      returnUrl?: string
      cancelUrl?: string
    }
    information?: {
      name?: string
      logo?: string
    }
  }
}

Example

import { CreateCredimaxSession } from '@404-software/credimax'

const { paymentUrl, successIndicator } = await CreateCredimaxSession({
	order: {
		id: '123',
		total: 20.5,
	},
	address: {
		city: 'Manama',
		street: 'Block 1, Street 2, Building 3',
	},
})
1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.2

3 years ago

1.0.31

3 years ago

1.0.22

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.30

3 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago