1.0.13 • Published 7 months ago

ks-pay-package-pvt v1.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

KS-PAY PAYMENT PACKAGE

Integrate package in your react application.


Prerequisites

  • git
  • npm
  • react

Examples

  1. Installation

import Gateways from "ks-pay-package-pvt";
  1. BASIC EXAMPLE:

   
    const[gatewayDetails,setGatewayDetails]=React.useState(null)
  const processOrder=async()=>{
      let headers={
           "x-signature":sign     // Signature will get from initate API
                  } 
try{ 

  let res=await axios.post(`${BASE_URL}/transaction/process`,{},{headers})
    setGatewayDetails(res?.data?.result)
}catch(e){
  console.log(e)
}

}



 

  return (
    <div>
       {
        gatewayDetails &&  Object.keys(gatewayDetails).length!=0 &&  <Gateways  payload={gatewayDetails} />
      }
    </div>
  );
  1. FULL EXAMPLE:
import React, { useState } from "react";
import Gateways from "ks-pay-package-pvt";

export default function App() {
  const[gatewayDetails,setGatewayDetails]=React.useState(null)
  const processOrder=async()=>{
      let headers={
           "x-signature":sign     // Signature will get from initate API
                  } 
try{ 

  let res=await axios.post(`${BASE_URL}/transaction/process`,{},{headers})
    setGatewayDetails(res?.data?.result)
}catch(e){
  console.log(e)
}

}

  return (
    <div>
       {
        gatewayDetails &&  Object.keys(gatewayDetails).length!=0 &&  <Gateways  payload={gatewayDetails} />
      }
    </div>
  );
}
1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.11

8 months ago

1.0.10

8 months ago

1.0.13

7 months ago

1.0.12

7 months ago

2.0.7

12 months ago

2.0.6

12 months ago

2.0.5

12 months ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago