diff --git a/lib/sepa.js b/lib/sepa.js index 1d6c962..ce862f1 100644 --- a/lib/sepa.js +++ b/lib/sepa.js @@ -28,6 +28,7 @@ 'pain.001.001.02': 'pain.001.001.02', 'pain.001.003.02': 'pain.001.003.02', 'pain.001.001.03': 'CstmrCdtTrfInitn', + 'pain.001.002.03': 'CstmrCdtTrfInitn', 'pain.001.003.03': 'CstmrCdtTrfInitn', 'pain.008.001.01': 'pain.008.001.01', 'pain.008.003.01': 'pain.008.003.01', @@ -60,7 +61,6 @@ /** Payment Info array */ _paymentInfo: [], - /** SEPA Document type setting, contains the root element */ /** SEPA Document type setting, contains the root element */ _type: null, diff --git a/lib/sepa.min.js b/lib/sepa.min.js index 14be460..5283982 100644 --- a/lib/sepa.min.js +++ b/lib/sepa.min.js @@ -1 +1 @@ -(function(exports){var t="http://www.w3.org/2001/XMLSchema-instance";var n="urn:iso:std:iso:20022:tech:xsd:";var e=".";function r(t){e=t}var i={"pain.001.001.02":"pain.001.001.02","pain.001.003.02":"pain.001.003.02","pain.001.001.03":"CstmrCdtTrfInitn","pain.001.003.03":"CstmrCdtTrfInitn","pain.008.001.01":"pain.008.001.01","pain.008.003.01":"pain.008.003.01","pain.008.001.02":"CstmrDrctDbtInitn","pain.008.003.02":"CstmrDrctDbtInitn"};function o(t){var n=t.indexOf("pain.008")===0?1:0;return parseInt(t.substr(-2),10)+n}function a(t){this._painFormat=t||"pain.008.001.02";this._type=i[t];this._paymentInfo=[];this.grpHdr=new s(this._painFormat)}a.Types=i;a.prototype={_painFormat:null,grpHdr:null,_paymentInfo:[],_type:null,addPaymentInfo:function(t){if(!(t instanceof u)){throw new Error("Given payment is not member of the PaymentInfo class")}if(t.id){t.id=this.grpHdr.id+e+t.id}else{t.id=this.grpHdr.id+e+this._paymentInfo.length}this._paymentInfo.push(t)},createPaymentInfo:function(){return new u(this._painFormat)},normalize:function(){var t=0;var n=0;for(var e=0,r=this._paymentInfo.length;e=65&&i<=90){n+=(i-55).toString()}else if(i>=97&&i<=122){n+=(i-87).toString()}else if(i>=48&&i<=57){n+=t[e]}}return n}function l(t){var n=0;for(var e=0,r=t.length;e=65&&i<=90){n+=(i-55).toString()}else if(i>=97&&i<=122){n+=(i-87).toString()}else if(i>=48&&i<=57){n+=t[e]}}return n}function l(t){var n=0;for(var e=0,r=t.length;e