1.0.13 • Published 4 months ago
ks-pay-package-pvt v1.0.13
KS-PAY PAYMENT PACKAGE
Integrate package in your react application.
Prerequisites
- git
- npm
- react
Examples
Installation
import Gateways from "ks-pay-package-pvt";
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>
);
- 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
6 months ago
1.0.8
6 months ago
1.0.7
6 months ago
1.0.6
6 months ago
1.0.5
6 months ago
1.0.4
6 months ago
1.0.11
6 months ago
1.0.10
6 months ago
1.0.13
4 months ago
1.0.12
4 months ago
2.0.7
10 months ago
2.0.6
10 months ago
2.0.5
10 months ago
2.0.4
10 months ago
2.0.3
10 months ago
2.0.2
10 months ago
2.0.1
10 months ago
2.0.0
10 months ago
1.0.3
10 months ago
1.0.1
10 months ago
1.0.0
10 months ago