0.1.42 • Published 2 years ago

@sendyit/payments v0.1.42

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

@sendyit/payment

In-depth documentation can be found using the link below

https://sendy.atlassian.net/wiki/spaces/PF/pages/edit-v2/1966440548

How to use

npm install @sendyit/payments

got to the src/main.js and add the following lines

import router from './router'
import store from './store'
import payments from '@sendyit/payments';

Vue.use(payments, {
  store,
  router,
  config: {
    BASE_URL: '/payment-service-base-url', // add payment service base URl
    VGS_VAULT_ID: 'txxxxxxxxxxx',
    VGS_ENVIRONMENT: 'sandbox', // environment is 'sandbox' for staging and 'live' for prod environment.
  },
});

How to call the payment library.

So there 4 entry points:

1. checkout
2. payment-option
3. choose-payment
4. Choose-payment-checkout - Choose payment page with checkout.

To go to checkout page call the following method as shown below by passing the Bu payload

 const buPayload = {
   user_id: 1,
   entity_id: 1,
   currency: 'KES',
   country_code: 'KE',
   amount: '100',
   success_callback_url: '',
   fail_callback_url: '',
   txref: this.txref,
   bulk: false,
   paybill_no: '4444444',
   email: 'johndoe@gmail.com',
   authToken: '', //Add Jwt token for authentication.
   firstname: 'John',
   lastname: 'doe',
   payment_options: [1, 2],// This are the payment_methods_id you get from the paymeht methods available. They are used to filter the payment methods you want the user shown.
   company_code: 'SKML', // add compnay code to associate a transaction to it's repective company.
   locale: 'en', // add locale. 'en' & 'fr' are the supported languages now.
 };

 this.$paymentInit(buPayload, 'checkout'); //the 2nd argument can be a 'checkout', 'payment-option', 'choose-payment' or 'choose-payment-checkout, in order to access the three entry points of the Bu.

How test and collaborate

In order to help and collaborate, clone this repo, then add what you can improve, and build the npm version of the repo locally in the dist file in the root of the folder, using the below command

npm run build-lib

To version the App

Use the below command for versioning of the app.

npm version patch -m "Add a comment for the versioning"

publish

in order to publish the app, use the below command

npm publish

Customize configuration

See Configuration Reference.

0.1.42

2 years ago

0.1.41

2 years ago

0.1.36

2 years ago

0.1.37

2 years ago

0.1.40

2 years ago

0.1.38

2 years ago

0.1.39

2 years ago

0.1.30

2 years ago

0.1.31

2 years ago

0.1.32

2 years ago

0.1.33

2 years ago

0.1.34

2 years ago

0.1.35

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.1.27

2 years ago

0.1.28

2 years ago

0.1.29

2 years ago

0.1.20

2 years ago

0.1.21

2 years ago

0.1.22

2 years ago

0.1.23

2 years ago

0.1.24

2 years ago

0.1.25

2 years ago

0.1.26

2 years ago

0.1.16

2 years ago

0.1.17

2 years ago

0.1.18

2 years ago

0.1.19

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.8

2 years ago

0.1.9

2 years ago

0.1.7

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago