Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /**
  2.  * used in DroidMart Business software in Android
  3.  *
  4.  */
  5.  
  6. var AuthorizeNet = function() {};
  7. /* APILoginID, TransactionKey
  8.  * CreditCardNumber
  9.  * CreditCardExpirationMonth
  10.  * CreditCardYearExpiration
  11.  * Amount, CurrencyCode
  12.  */
  13.  
  14. AuthorizeNet.prototype.request = function(content, success, fail) {
  15.     fail    = (typeof fail != "function") ? function(){} : fail;
  16.     success = (typeof success != "function") ? function(){} : success;
  17.    
  18.     return cordova.exec( success, fail, 'AuthorizeNet', 'request', [content]);
  19. };
  20.  
  21. if(!window.plugins) {
  22.     window.plugins = {};
  23. }
  24. if (!window.plugins.AuthorizeNet) {
  25.     window.plugins.AuthorizeNet = new AuthorizeNet();
  26. }