项目作者: shandanjay

项目描述 :
cordova plugin payhere client for android
高级语言: Java
项目地址: git://github.com/shandanjay/cordova-client-plugin-for-payhere.lk.git


Apache Cordova android plugin for Payhere payment gateway

Installation

  1. npm install cordova-payhere-client --save
  2. cordova plugin add cordova-payhere-client

Usage Example

  1. window.payhereClient.checkout( {
  2. merchantId: "<PAYHERE_SANDBOX_MERCHANT_ID>",
  3. merchantSecret: "<PAYHERE_SANDBOX_MERCHANT_SECRET>",
  4. amount: 1180.50, // Amount which the customer should pay
  5. currency: "LKR",
  6. orderId: "123",
  7. itemsDescription: "Desc",
  8. custom1: "",
  9. custom2: "",
  10. customer: {
  11. firstName: "Dan",
  12. lastName: "Jay",
  13. email: "shandanjay@gmail.com",
  14. phone: "0715753168"
  15. },
  16. billing: {
  17. address: "5A",
  18. city: "Colombo",
  19. country: "Sri Lanka"
  20. },
  21. shipping: {
  22. address: "Park Avenue", //shipping
  23. city: "5A", // shipping
  24. country: "" //shipping
  25. }
  26. //Item(null, "Door bell wireless", 1));
  27. },
  28. function (param) {
  29. console.log(param);
  30. },
  31. function (param) {
  32. console.log(param);
  33. }
  34. );
  • Note: This version has support for Android platform only. iOS support is not added (Yet)