0.1.0 • Published 5 years ago

cordova-plugin-pax-payment v0.1.0

Weekly downloads
5
License
Apache-2.0
Repository
github
Last release
5 years ago

cordova-plugin-pax-payment

PAX Payment is Cordova/PhoneGap Plugin for Kompakts emulator (sk.kompakts.emulator/sk.kompakts.emulator.MainActivity). On the A920 Payment Tablet Terminal is the world’s most elegantly designed and compact secure electronic payment terminal.

Follows the Cordova Plugin spec, so that it works with Plugman.

Installation

This requires phonegap 7.1.0+ ( current stable v8.0.0 )

cordova plugin add cordova-plugin-pax-payment

It is also possible to install via repo url directly ( unstable )

cordova plugin add https://github.com/VIMHaos/cordova-plugin-pax-payment.git

Supported Platforms

  • Android

Using the plugin

The plugin creates the object cordova.plugins.PaxPayment with the method request(options, successCallback, errorCallback).

  1. Register Kompakts emulator service:
   cordova.plugins.PaxPayment.register("sk.kompakts.emulator",
      function (result) {
          alert(result);
      },
      function (error) {
          alert('Register fail: ' + error)
      }
   );
  1. Make request for payment:
   cordova.plugins.PaxPayment.request(
      {
          Amount: 1.00,
          Currency: 'eur',
          Operation: 'CP',
          TransactionID: '1512',
          VarSymbol: '123'
      },
      function (result) {
          alert('Payment success: ' + JSON.stringify(result));
      },
      function (error) {
          alert('Payment fail: ' + JSON.stringify(error))
      }
   );