Java
This is java sdk for integrating your java application with Ksher Payment Gateway.
Java SDK on Github Please refer to our official api document
#
RequirementJava 11
- this has been tested and run on java 11.
Ksher Payment API Account
- Requesting sandbox account please contact support@ksher.com
API_URL
- Along with a sandbox account, you will be receiving a API_URL in this format: s[UNIQUE_NAME].vip.ksher.net
API_TOKEN
- Log in into API_URL using given sandbox account and get the token. see (How to get API Token)[https://doc.vip.ksher.net/docs/howto/api_token]
The Payment SDK for accessing *.vip.ksher.net
#
How to Installplease see the dependency tag that need to be add in your project's pom.xml file here
#
package cannot be foundif after adding the tag and you got error saying it cannot find the package, you probably didn't config your project settings.xml to check github package. please follow this guide here on how to update settings.xml
#
How to Useyou need to first init the payment object, then you can use it to;
- Init Payment Object
- Create New Order
- Query Order Status
- Refund the Order
#
Init Payment Objectksherpay have multiple api (apiType) such as;
- redirect API is for Website and Mobile App integration.
- settlement API is for checking the settlement information.
- miniapp API is for WeChat and Alipay Mini-Program integration.
- event API is for checking the events deliveried.
- C scan B API is for C scan B(merchant present QR code) or Kiosk integration.
- B scan C API is for B scan C(customer present QR code) or POS integration.
you can read about it here
Currently, this python sdk support only two api; 'redirect api' and 'c scan b api'
#
Redirect API#
C_Scan_B API#
Create New Ordermerchant_order_id need to be unique or else the request will end with error
to create new order, each apiType has slightly different required parameters
#
Create New Order at Redirect API#
Create New Order at C_Scan_B APIfor 'C_Scan_B API', redirect_url is not needed and you can specified one channel at a time.
#
Query order status#
RefundRefund_id need to be unique or else the request will end with error