1.1.4 • Published 11 months ago

@404-software/credimax v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months 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

11 months ago

1.1.3

12 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.2

1 year ago

1.0.31

1 year ago

1.0.22

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.30

1 year ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago