{"_id":"mobilpay-node","_rev":"11-43c235b416dbb91f67690e38ad9cee18","name":"mobilpay-node","description":"MobilPay Gateway library","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"mobilpay-node","version":"0.0.1","description":"MobilPay Gateway library","main":"index.js","scripts":{"build":"gulp dist-es5"},"keywords":["payment","card"],"author":{"name":"Robert Richter"},"license":"ISC","devDependencies":{"body-parser":"^1.15.2","chai":"^3.5.0","express":"^4.14.0","express-nunjucks":"^1.0.0","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","mocha":"^2.5.3"},"dependencies":{"es6-promise":"^3.2.1","lodash":"^4.13.1","md5":"^2.1.0","moment":"^2.13.0","node-rsa":"^0.4.0","request":"^2.72.0","uuid":"^2.0.2","xml2js":"^0.4.16","xmlbuilder":"^8.2.2"},"_id":"mobilpay-node@0.0.1","_shasum":"a7c33bfb5125dcd296e2cb314be72a3035921fee","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"rrichter","email":"robi.richter@gmail.com"},"dist":{"shasum":"a7c33bfb5125dcd296e2cb314be72a3035921fee","tarball":"https://registry.npmjs.org/mobilpay-node/-/mobilpay-node-0.0.1.tgz","integrity":"sha512-Y3XjI7rQ+r9bN9y+UJeVXhBjw9jKeJD8IOp+AwWmwFUu5RX0Ni8A3/JNDQyPDX8sZvpD9I0tVQKd1rE6z4VE5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEKuD3+ZsaC4upaQ/yNANJwoPDgx9n9sfXNNHG4acROkAiAbnR+4zXFVbPupnJgRz15OHw0mJjPzFfWoFF3jbynOCA=="}]},"maintainers":[{"name":"rrichter","email":"robi.richter@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/mobilpay-node-0.0.1.tgz_1467798553183_0.09993611415848136"},"directories":{}},"0.0.3":{"name":"mobilpay-node","version":"0.0.3","description":"MobilPay Gateway library","main":"index.js","scripts":{"build":"gulp dist-es5"},"repository":{"url":"git+https://github.com/robi-richter/mobilpay-node.git","type":"git"},"keywords":["payment","card"],"author":{"name":"Robert Richter"},"license":"ISC","devDependencies":{"babel":"^6.5.2","babel-preset-es2015":"^6.9.0","body-parser":"^1.15.2","chai":"^3.5.0","express":"^4.14.0","express-nunjucks":"^1.0.0","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","mocha":"^2.5.3"},"dependencies":{"es6-promise":"^3.2.1","lodash":"^4.13.1","md5":"^2.1.0","moment":"^2.13.0","node-rsa":"^0.4.0","request":"^2.72.0","uuid":"^2.0.2","xml2js":"^0.4.16","xmlbuilder":"^8.2.2"},"bugs":{"url":"https://github.com/robi-richter/mobilpay-node/issues"},"homepage":"https://github.com/robi-richter/mobilpay-node#readme","_id":"mobilpay-node@0.0.3","_shasum":"170f4f2f58db95a2c7e3d42e89433484664ce8bb","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"rrichter","email":"robi.richter@gmail.com"},"dist":{"shasum":"170f4f2f58db95a2c7e3d42e89433484664ce8bb","tarball":"https://registry.npmjs.org/mobilpay-node/-/mobilpay-node-0.0.3.tgz","integrity":"sha512-ja+lL9nXV0efbYIBWE6mumvkqF/Xhp1bd7og6AH9LE1v7NbGfCeB7ffVw0J2gKgK30h1git6WmSuiPlgAkEefA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCatHxGa9L/yRVG95Hu9+GSIOYqaVO+F/xwcu6PEEPnUAIgdN/m9GRAOGIhAWVWkwwUAUiJW5BQrLG9mmZoe2rw8Zw="}]},"maintainers":[{"name":"rrichter","email":"robi.richter@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/mobilpay-node-0.0.3.tgz_1467798932217_0.3334003281779587"},"directories":{}},"0.0.4":{"name":"mobilpay-node","version":"0.0.4","description":"MobilPay Gateway library","main":"index.js","scripts":{"build":"gulp dist-es5"},"repository":{"url":"git+https://github.com/robi-richter/mobilpay-node.git","type":"git"},"keywords":["payment","card"],"author":{"name":"Robert Richter"},"license":"ISC","devDependencies":{"babel":"^6.5.2","babel-preset-es2015":"^6.9.0","body-parser":"^1.15.2","chai":"^3.5.0","express":"^4.14.0","express-nunjucks":"^1.0.0","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","mocha":"^2.5.3"},"dependencies":{"es6-promise":"^3.2.1","lodash":"^4.13.1","md5":"^2.1.0","moment":"^2.13.0","node-rsa":"^0.4.0","request":"^2.72.0","uuid":"^2.0.2","xml2js":"^0.4.16","xmlbuilder":"^8.2.2"},"bugs":{"url":"https://github.com/robi-richter/mobilpay-node/issues"},"homepage":"https://github.com/robi-richter/mobilpay-node#readme","_id":"mobilpay-node@0.0.4","_shasum":"391f605f11aac0a5134629c52c83edac6d35f94b","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"rrichter","email":"robi.richter@gmail.com"},"dist":{"shasum":"391f605f11aac0a5134629c52c83edac6d35f94b","tarball":"https://registry.npmjs.org/mobilpay-node/-/mobilpay-node-0.0.4.tgz","integrity":"sha512-4bXLMI4iOgA368kC04DufvqyGkS23OxzSKEzJB0QCQS9zBSeXMfzfE9z90p3wWC3FgCysLSncfGJhz2fD/IVlA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAiA0vji91TMGgOynC+x3H25f7wh9CJEkbegYQru2ncQIhAOh1Cqq/Zs2RGgv2e2jcCXZFO4+hY92uOHk+c3+yzhLw"}]},"maintainers":[{"name":"rrichter","email":"robi.richter@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/mobilpay-node-0.0.4.tgz_1467801506664_0.36153479968197644"},"directories":{}},"0.0.5":{"name":"mobilpay-node","version":"0.0.5","description":"MobilPay Gateway library","main":"index.js","scripts":{"build":"gulp dist-es5"},"repository":{"url":"git+https://github.com/robi-richter/mobilpay-node.git","type":"git"},"keywords":["payment","card"],"author":{"name":"Robert Richter"},"license":"ISC","devDependencies":{"babel":"^6.5.2","babel-preset-es2015":"^6.9.0","body-parser":"^1.15.2","chai":"^3.5.0","express":"^4.14.0","express-nunjucks":"^1.0.0","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","mocha":"^2.5.3"},"dependencies":{"es6-promise":"^3.2.1","lodash":"^4.13.1","md5":"^2.1.0","moment":"^2.13.0","node-rsa":"^0.4.0","request":"^2.72.0","uuid":"^2.0.2","xml2js":"^0.4.16","xmlbuilder":"^8.2.2"},"bugs":{"url":"https://github.com/robi-richter/mobilpay-node/issues"},"homepage":"https://github.com/robi-richter/mobilpay-node#readme","_id":"mobilpay-node@0.0.5","_shasum":"a331d3cfdaae1ad52b1bce5ab1d11fcf799dbf97","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.7.0","_npmUser":{"name":"rrichter","email":"robi.richter@gmail.com"},"dist":{"shasum":"a331d3cfdaae1ad52b1bce5ab1d11fcf799dbf97","tarball":"https://registry.npmjs.org/mobilpay-node/-/mobilpay-node-0.0.5.tgz","integrity":"sha512-zLvWrKClmzwwQznuY4jNT+4lnRIU6QuHX/NX6qLeSeVVZZTxHQc1rV8km8hALaA1KzM4LfX5tPAQbDkHYcr0Sw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUNyf2nxY7kYEIE9TlYRYPlE2x9VHBcVLZ2M/oNbrnBAIgO3l+heAX1ZtTGgQlPtlQtfqxozczVUX2cKirI1gf7Q8="}]},"maintainers":[{"name":"rrichter","email":"robi.richter@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/mobilpay-node-0.0.5.tgz_1475867106053_0.29825301677919924"},"directories":{}},"0.0.6":{"name":"mobilpay-node","version":"0.0.6","description":"MobilPay Gateway library","main":"index.js","scripts":{"build":"gulp dist-es5"},"repository":{"url":"git+https://github.com/robi-richter/mobilpay-node.git","type":"git"},"keywords":["payment","card"],"author":{"name":"Robert Richter"},"license":"ISC","devDependencies":{"babel":"^6.5.2","babel-preset-es2015":"^6.16.0","body-parser":"^1.15.2","chai":"^3.5.0","express":"^4.14.0","express-nunjucks":"^2.0.1","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","mocha":"^3.1.0"},"dependencies":{"es6-promise":"^4.0.5","lodash":"^4.16.4","md5":"^2.2.1","moment":"^2.15.1","node-rsa":"^0.4.2","request":"^2.75.0","uuid":"^2.0.3","xml2js":"^0.4.17","xmlbuilder":"^8.2.2"},"bugs":{"url":"https://github.com/robi-richter/mobilpay-node/issues"},"homepage":"https://github.com/robi-richter/mobilpay-node#readme","_id":"mobilpay-node@0.0.6","_shasum":"669f38e634386e71ce539f403977e283bdb8d38d","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.7.0","_npmUser":{"name":"rrichter","email":"robi.richter@gmail.com"},"dist":{"shasum":"669f38e634386e71ce539f403977e283bdb8d38d","tarball":"https://registry.npmjs.org/mobilpay-node/-/mobilpay-node-0.0.6.tgz","integrity":"sha512-Ev+8w6lbCJcnANwCi0Ln7Dt7qrmMp2cBFkByFM+e1RD5cozRg99NUpSeyBqKUdVk1p4nTPyvcjvAmrFUdY9LsA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDzC+79NrZff7wikrt04tPv1w1h2vb5r2+eNIx42WuIeAiEAwI6wbKoWXS2x6t2jRQS7n7DfBLc/Pyat+l81l4zDkFM="}]},"maintainers":[{"name":"rrichter","email":"robi.richter@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/mobilpay-node-0.0.6.tgz_1475869177576_0.5405081300996244"},"directories":{}},"0.1.0":{"name":"mobilpay-node","version":"0.1.0","description":"MobilPay Gateway library","main":"index.js","scripts":{"build":"gulp dist-es5"},"repository":{"url":"git+https://github.com/robi-richter/mobilpay-node.git","type":"git"},"keywords":["payment","card"],"author":{"name":"Robert Richter"},"license":"ISC","devDependencies":{"babel":"^6.5.2","babel-preset-es2015":"^6.16.0","body-parser":"^1.15.2","chai":"^3.5.0","express":"^4.14.0","express-nunjucks":"^2.0.1","gulp":"^3.9.1","gulp-babel":"^6.1.2","gulp-clean":"^0.3.2","mocha":"^3.1.0"},"dependencies":{"es6-promise":"^4.0.5","lodash":"^4.16.4","md5":"^2.2.1","moment":"^2.15.1","node-rsa":"^0.4.2","request":"^2.75.0","uuid":"^2.0.3","xml2js":"^0.4.17","xmlbuilder":"^8.2.2"},"bugs":{"url":"https://github.com/robi-richter/mobilpay-node/issues"},"homepage":"https://github.com/robi-richter/mobilpay-node#readme","_id":"mobilpay-node@0.1.0","_nodeVersion":"10.7.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-T8B1enTQgLz227pwbXF5ZV5yg299kB5SoZHuKpmRqVHfML04ESkB9J6H2atHpOztzTvwkCSEX3KFPsmXdtOADg==","shasum":"518774ea4d9b3206c6ac06375d5d1cb9f2695ca5","tarball":"https://registry.npmjs.org/mobilpay-node/-/mobilpay-node-0.1.0.tgz","fileCount":14,"unpackedSize":41294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdyo6nCRA9TVsSAnZWagAAwlcP/1ilXA3XjPLHNdJnIjxB\ngct1VzuzQ39WjyR7QsoAnZbEAkA93bbk7phrkPVD2cByN0Md7y1v6PKEGKfC\n+qVAWY/Z5j6tQhjNRpRptsJ0tIPgoApwB3dSuwdzF/zBjv8S5FHNhaBQ1fBH\nhbZ8bt0MQleowiRN5+NJzoIQllEBIcohtO8/zH8d9jvxw9o2I0TPXTWP/SLi\nbthtboeAi+Fetihofpy8SCAznhNLtJexevzZhJ0+syGE2JB5G7nJACSCwC/e\nPyzgQImQsUQ7uJKZGRnez3SSl+nLHe3k/3QBqaijI11mBR/sfeFbBATZgpEi\n7xcUqp0T0BEhM8mg60BPyLdl1Pvkw1eK0LQmnkgE/Teq1SEQkbEhcY0KjukK\nzETE/poKaY3sAqO2MF5SDnssmgJ8QFPhyi59N9ZHKV+T38VO/2RdyjI6ZGVH\ng45NvylDy2R6HLXbX0AUaGep7OexGJmI/2qqjeLtTIrXuy/4S2QHNBnMw77k\nOuYMtdST51eR3Yz6MvTqivIgyXbtAbv4IMuNNdPJxNw1ALGL7qrElHXc1qrX\nUBYTLXf8lkJwKHOg7YELJo8o0ZklUfQCQexBC7EwgfHANFwqon8rR72QKtiM\niA68JjizWoDQVum9o5wPJDxxCISPOWA0z/8MiWLDnHRB3G7pJrWX9GL2Jt5N\nXOcc\r\n=F1Sv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBQod2azlNulVIRRiudL6PwQfeZhHpvxXyGmCsjZ5OFGAiEApzsCM+juYuv1Fdzh33jwEc89U6P9hYyuox9vOWmnBPk="}]},"maintainers":[{"name":"rrichter","email":"robi.richter@gmail.com"}],"_npmUser":{"name":"rrichter","email":"robi.richter@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mobilpay-node_0.1.0_1573555879418_0.5935453956777699"},"_hasShrinkwrap":false},"0.2.0":{"name":"mobilpay-node","version":"0.2.0","description":"MobilPay Gateway library","main":"index.js","scripts":{"build":"gulp dist-es5"},"repository":{"url":"git+https://github.com/robi-richter/mobilpay-node.git","type":"git"},"keywords":["payment","card"],"author":{"name":"Robert Richter"},"license":"ISC","devDependencies":{"@babel/core":"^7.8.4","@babel/preset-env":"^7.8.4","babel":"^6.23.0","babel-preset-es2015":"^6.24.1","body-parser":"^1.19.0","chai":"^3.5.0","express":"^4.14.0","express-nunjucks":"^2.2.3","gulp":"^4.0.2","gulp-babel":"^8.0.0","gulp-clean":"^0.4.0","mocha":"^7.0.1"},"dependencies":{"es6-promise":"^4.0.5","lodash":"^4.17.15","md5":"^2.2.1","moment":"^2.15.1","node-rsa":"^0.4.2","request":"^2.75.0","uuid":"^2.0.3","xml2js":"^0.4.17","xmlbuilder":"^8.2.2"},"bugs":{"url":"https://github.com/robi-richter/mobilpay-node/issues"},"homepage":"https://github.com/robi-richter/mobilpay-node#readme","_id":"mobilpay-node@0.2.0","_nodeVersion":"12.14.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-hucjACC3QFJbu72WqJnqzZo+A2p6naUW88P1qAJpgMUyRzK7Fl/Oil1M4+Fq+XCZ9Rh/BhCy596u0WAokPzJVQ==","shasum":"e07f3f03ab0addbfd9ff2bb9a440aa237a8e4a58","tarball":"https://registry.npmjs.org/mobilpay-node/-/mobilpay-node-0.2.0.tgz","fileCount":14,"unpackedSize":50111,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeRok5CRA9TVsSAnZWagAA2fIQAJHQaaGSJDTQSmw0rc5m\n3kBCYGmx8vgKBUFcDHis3manKizHM3ry6zNzyK0H9aE5G3DOYeLC8qvb7xB9\nXl+H4y31DTgplmoeC7+MdDFofEHid3vXR+mRGqfOSX/DeHhsCkyh7ElYw/li\nOZGszs0kX59wMxVBP/HMjkraMmmfX6vTJuE0xkNJJ8b8Ak7qK3g/HO5U1Q5b\nGzp5U5PLFoOt7VNmf9hVbLT8X/LkaCh/1Erv4WtunXbqwhzZVZMubsAaJVGw\n3k3pYKCe3tvPH59agYYPfPW/y2hVqmOus+rLKSmU1YcwA37tVHpqCc1F2+8Y\nv2QGnyepgDmTZ+ZkczC9ZX+F+dT6wLgm2JvguKksUSgG8JRNY8CMiGky4Y4M\na1XXAkoH2n8euJcOBuQI3W4+02f1y1m63tIG5TFidRg82YAL94ggRcB08qmZ\nv+Bhu9jFmPc69LIzdg29GK+SkoyxvjTTB4tERfQP5RkLg4IzVKsqfPsAXfjR\nK1b+c7D0coggnvlgXKb5AA8kgaXjXQSc9Bpezi5Sw4pwulfUTcjEKjjEP+o9\nwv7Qs0StzfRsFewO1/70NdS5HTs0e+n8FEvXnFpP4GwbHLBS/FxqzMOrBeds\n2Xhus77UR6Ak+obyfncEuRsAx0mZQv1IGZ24L3TzYfUXJkNTvI5oI1/BN09F\nqkAn\r\n=zTA1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXZQPBbvkX5Nn42I0Dur8E8TH6FTUUgiav8nzAeQXz3QIgep6wPLbuegO8LHVq63tLuOeTQxx0sHw3+gmTOwu1ms4="}]},"maintainers":[{"name":"rrichter","email":"robi.richter@gmail.com"}],"_npmUser":{"name":"rrichter","email":"robi.richter@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mobilpay-node_0.2.0_1581680952836_0.05441499977496678"},"_hasShrinkwrap":false}},"readme":"# mobilpay-node\n\n[![dependencies Status](https://david-dm.org/robi-richter/mobilpay-node/status.svg)](https://david-dm.org/robi-richter/mobilpay-node)\n[![devDependencies Status](https://david-dm.org/robi-richter/mobilpay-node/dev-status.svg)](https://david-dm.org/robi-richter/mobilpay-node?type=dev)\n\n## About\nthis is a lightweight NodeJs library to integrate MobilPay payment gateway in your projects.\nBare in mind that it's still **under development** and **does't support all the payment options**.\nSo, feel free to contribute ;)\n\n## Usage\n\n```javascript\nvar mobilpay = require('mobilpay-node');\nvar constants = mobilpay.constants;\n```\n\nBare in mind that you need to extract the public key from the public certificate provided by Mobilpay\n\n```bash\nopenssl x509 -pubkey -noout -in PUBLIC_CERTIFICATE_FILE.cer > PUBLIC_KEY.pem\n```\n\nCreate Mobilpay instance\n```javascript\n// create Mobilpay instance\n\nvar MobilPay = new mobilpay.Mobilpay({\n  signature: '',\n  sandbox: true,\n  publicKeyFile: '',\n  privateKeyFile: '',\n  serviceType: 1, // default value \n});\n```\n\nserviceType can take one of the following values:\n- 1 (Standard payment)\n- 3 (Payment with prefilled card data)\n\n\nserviceType with value 2 is not yet implemented (Payment with CVV only)\n\nCreate a new payment request\n```javascript\nvar paymentRequest = MobilPay.createRequest({\n  amount: parseFloat(Math.round(Math.random() * 10000)/100).toFixed(2),\n  customerId: '12345',\n  billingAddress: {\n    type: constants.ADDRESS_TYPE_PERSON,\n    firstName: 'Damian',\n    lastName: 'Gardner',\n    email: 'damian.gardner@inbound.plus',\n    address: '4793 College Street, Cluj-Napoca, Cluj',\n    mobilePhone: '0722222222'\n  },\n  shippingAddress: {\n    type: constants.ADDRESS_TYPE_PERSON,\n    firstName: 'Damian',\n    lastName: 'Gardner',\n    email: 'damian.gardner@inbound.plus',\n    address: '4793 College Street, Cluj-Napoca, Cluj',\n    mobilePhone: '0722222222'\n  },\n  confirmUrl: 'http://mysite.local/confirm',\n  returnUrl: 'http://mysite.local/return',\n  params: {\n    test1: 'test param 1',\n    test2: 'test param 2',\n  }\n});\n```\n\nIf the serviceType is 3, the paymentRequest from above should contain:\n```\n  tokenId: 'token id from mobilpay',\n  panMasked: 'pan masked from mobilpay'\n```\n\nPrepare redirect data\n```javascript\nMobilPay.prepareRedirectData(paymentRequest)\n  .then(function(result) {\n\n    console.log(\n      'Redirect URL: ' + result.url,\n      'env_key: ' + result.envKey,\n      'data: ' + result.data\n    );\n\n  })\n  .catch(function(err) {\n    console.log(err);\n  });\n```\n\nWith the prepared data render a form and display it to the client\n\n```html\n<form name=\"frmPaymentRedirect\" method=\"post\" action=\"{{ redirectUrl }}\">\n    <input type=\"hidden\" name=\"env_key\" value=\"{{ envKey }}\"/>\n    <input type=\"hidden\" name=\"data\" value=\"{{ data }}\"/>\n    <p>\n        You will be redirected to a secure page on mobilpay.ro\n    </p>\n    <p>\n        Click to continue <input type=\"submit\" value=\"Submit\">\n    </p>\n</form>\n```\n\nMobilpay will POST notifications to your confirm URL which can be something\nlike this *http://mysite.local/confirm*. to handle these notifications you'll need\nto add this pice of code your route handler\n```javascript\nmobilPay.handleGatewayResponse({\n  envKey: 'content from env_key POST body',\n  data: 'content from data POST body'\n  })\n  .then(function(data) {\n    // check the response and send back an acknowledge message\n    var response = new mobilpay.MerchantResponse({\n      message: data.response.crc\n    });\n\n    // send response.toXml() as response\n  })\n  .catch(function(err) {\n    // handle error case\n  });\n```\n\n### Retrieve session id\nIn order to cancel a payment, you need a sessionId. `MobilPay.getSessionId()` method will return a promise that is resolved with an object that contains property sessionId:\n\n```javascript\nMobilPay.getSessionId({\n  username: 'mobilpay.username',\n  password: 'mobilpay.password'\n  })\n  .then(response => {\n    console.log(response); // { sessionId: 'unique user session identifier'}\n    const { sessionId } = response;\n  })\n  .catch(err => {\n    // handle error case\n    console.log(err)\n  })\n```\n\n### Cancel a payment\n\n```javascript\nMobilPay.creditInvoice({\n  sessionId: sessionId,\n  orderId: '', // payment request id you want to credit\n  amount: 10 // must be equal or less than the initial amount\n})\n  .then(response => console.log(response))\n  .catch(err => console.log(err))\n```","maintainers":[{"name":"rrichter","email":"robi.richter@gmail.com"}],"time":{"modified":"2022-06-20T00:56:52.605Z","created":"2016-07-06T09:49:14.139Z","0.0.1":"2016-07-06T09:49:14.139Z","0.0.3":"2016-07-06T09:55:33.152Z","0.0.4":"2016-07-06T10:38:27.541Z","0.0.5":"2016-10-07T19:05:08.656Z","0.0.6":"2016-10-07T19:40:27.056Z","0.1.0":"2019-11-12T10:51:19.540Z","0.2.0":"2020-02-14T11:49:12.934Z"},"keywords":["payment","card"],"author":{"name":"Robert Richter"},"license":"ISC","readmeFilename":"README.md","homepage":"https://github.com/robi-richter/mobilpay-node#readme","repository":{"url":"git+https://github.com/robi-richter/mobilpay-node.git","type":"git"},"bugs":{"url":"https://github.com/robi-richter/mobilpay-node/issues"},"users":{"rrichter":true}}