1. 1 :
  2. 2 :
  3. 3 : (function(root, factory) {
  4. 4 :
  5. 5 : if (typeof module === 'object' && module.exports) {
  6. 6 : // CommonJS-like environments that support module.exports, like Node.
  7. 7 : module.exports = factory(require('../ApiClient'), require('./InvocationContext'), require('../CommonUtil'), require('../ResponseWrapper'), require('./Base'), require('../OrbipayApiError'));
  8. 8 : }
  9. 9 : }(this, function(ApiClient, InvocationContext, CommonUtil, ResponseWrapper, Base, OrbipayApiError) {
  10. 10 : 'use strict';
  11. 11 :
  12. 12 : /**
  13. 13 : * The PaymentNetworkResponse wrapper module.
  14. 14 : * @module wrappers/PaymentNetworkResponse
  15. 15 : */
  16. 16 : var exports = function() {
  17. 17 :
  18. 18 : };
  19. 19 : exports.constructFromObject = function (data, obj) {
  20. 20 : if (data) {
  21. 21 : obj = obj || new exports();
  22. 22 : if (data.hasOwnProperty('payment_auth_code')) {
  23. 23 : obj['payment_auth_code'] = data['payment_auth_code'];
  24. 24 : }
  25. 25 : if (data.hasOwnProperty('payment_response_code')) {
  26. 26 : obj['payment_response_code'] = data['payment_response_code'];
  27. 27 : }
  28. 28 : if (data.hasOwnProperty('payment_response_msg')) {
  29. 29 : obj['payment_response_msg'] = data['payment_response_msg'];
  30. 30 : }
  31. 31 : }
  32. 32 : return obj;
  33. 33 : };
  34. 34 :
  35. 35 :
  36. 36 : exports.prototype = Object.create(Base.prototype);
  37. 37 : exports.prototype.constructor = exports;
  38. 38 :
  39. 39 : /**
  40. 40 : * The Auth Code returned by the card gateway. This is relevant only for card payments.
  41. 41 : * @member {String} payment_auth_code
  42. 42 : */
  43. 43 : exports.prototype['payment_auth_code'] = undefined;
  44. 44 : /**
  45. 45 : * This is the ACH return code in the case of a returned payment over the NACHA ACH network. In the case of declined card payment, it's the decline code received from the card issuer or the card processor. In the case of a card chargeback, it's the chargeback code received from the card network.
  46. 46 : * @member {String} payment_response_code
  47. 47 : */
  48. 48 : exports.prototype['payment_response_code'] = undefined;
  49. 49 : /**
  50. 50 : * The text describing the appropriate code captured in the payment_response_code as received from the corresponding payment network.
  51. 51 : * @member {String} payment_response_msg
  52. 52 : */
  53. 53 : exports.prototype['payment_response_msg'] = undefined;
  54. 54 :
  55. 55 :
  56. 56 :
  57. 57 :
  58. 58 : return exports;
  59. 59 :
  60. 60 : }));