{"_id":"paypal-ipn","_rev":"20-71f27f176962b565fe9667fea50e15ac","name":"paypal-ipn","description":"Package for verifying Paypal IPN messages","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"paypal-ipn","version":"1.0.0","description":"Package for verifying Paypal IPN messages","keywords":["paypal","ipn","payment"],"contributors":[{"name":"Chun-hao Hu","email":"hu.chunhao@gmail.com","url":"http://blog.huchunhao.com"}],"bugs":{"url":"https://github.com/andzdroid/paypal-ipn/issues"},"repositories":[{"type":"git","url":"git@github.com:andzdroid/paypal-ipn.git"}],"dependencies":{},"main":"index","engines":["node"],"devDependencies":{},"_id":"paypal-ipn@1.0.0","_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"bedd4628edd794cb04062ab0be90beda2ddbe62d","tarball":"https://registry.npmjs.org/paypal-ipn/-/paypal-ipn-1.0.0.tgz","integrity":"sha512-ZeREtFTPxSkGDnmhfyvrv3lLv7gm9dSAmyF+CkqYL1v1nS3Tkxkcc+g2yy2AjTKTJE01uFrIKsebHT3oMO+xUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCislDCGRfoyw+LwVVy+09jzs3jsKTZuXGZ6zftLPbJowIhAN0JseSbxCmLOULVWDOtXlL1epKmpOzaHHQ/SWg3KUEv"}]},"scripts":{}},"1.0.1":{"name":"paypal-ipn","version":"1.0.1","description":"Package for verifying Paypal IPN messages","keywords":["paypal","ipn","payment"],"contributors":[{"name":"Chun-hao Hu","email":"hu.chunhao@gmail.com","url":"http://blog.huchunhao.com"}],"bugs":{"url":"https://github.com/andzdroid/paypal-ipn/issues"},"repositories":[{"type":"git","url":"git@github.com:andzdroid/paypal-ipn.git"}],"dependencies":{},"main":"index","engines":["node"],"devDependencies":{},"_id":"paypal-ipn@1.0.1","_engineSupported":true,"_npmVersion":"1.0.6","_nodeVersion":"v0.5.0-pre","_defaultsLoaded":true,"dist":{"shasum":"de2eb291f12aa56cde720f2075304cd367444450","tarball":"https://registry.npmjs.org/paypal-ipn/-/paypal-ipn-1.0.1.tgz","integrity":"sha512-vBHSelXDODSix2gvXjpP4ODqta0ycMz+W6Mf1fYyo+CR765gnK3NIFkzRTNSydSQf5Q9ZvaMrR48Aj5kojKL5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeK1fyg4oyoqRbAJUYbDs7u+0cJYvZcX68vx8E7QLPVQIgA8Zikzjzgc2VKSY4arZKFxKrJUHBoLk+i8b66Jv+fx4="}]},"scripts":{}},"2.1.0":{"name":"paypal-ipn","version":"2.1.0","description":"Package for verifying Paypal IPN messages","keywords":["paypal","ipn","payment"],"contributors":[{"name":"Chun-hao Hu","email":"hu.chunhao@gmail.com","url":"http://blog.huchunhao.com"}],"bugs":{"url":"https://github.com/andzdroid/paypal-ipn/issues"},"repository":{"type":"git","url":"git@github.com:andzdroid/paypal-ipn.git"},"dependencies":{},"main":"index","scripts":{"test":"nodeunit tests"},"engines":["node"],"devDependencies":{"nodeunit":"^0.9.0"},"homepage":"https://github.com/andzdroid/paypal-ipn","_id":"paypal-ipn@2.1.0","_shasum":"c667290df36eab76c47d2693246adf5346b78e90","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"andz","email":"zegg90@gmail.com"},"maintainers":[{"name":"andz","email":"zegg90@gmail.com"}],"dist":{"shasum":"c667290df36eab76c47d2693246adf5346b78e90","tarball":"https://registry.npmjs.org/paypal-ipn/-/paypal-ipn-2.1.0.tgz","integrity":"sha512-dq+l3+OM/ezEmMeBk3u/DYalJuBqTjpb4Dhxmgyh9567Nq/OPb0YQnW650TsfzXXuyOBsY4M9phTSE0hDrZjvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+TmlgZUuT5FJR+HN0L6Fbglfe/99NfEzRlvreqxk5pwIgeEjArTIUgXa/djIEGNwqLrqXaiMiuZEzO2kySV75fmQ="}]}},"2.0.0":{"name":"paypal-ipn","version":"2.0.0","description":"Package for verifying Paypal IPN messages","keywords":["paypal","ipn","payment"],"contributors":[{"name":"Chun-hao Hu","email":"hu.chunhao@gmail.com","url":"http://blog.huchunhao.com"}],"bugs":{"url":"https://github.com/andzdroid/paypal-ipn/issues"},"repository":{"type":"git","url":"git@github.com:andzdroid/paypal-ipn.git"},"dependencies":{},"main":"index","engines":["node"],"homepage":"https://github.com/andzdroid/paypal-ipn","_id":"paypal-ipn@2.0.0","_shasum":"f8714313dded3ef106295b26e3d240a5ba687130","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"andz","email":"zegg90@gmail.com"},"maintainers":[{"name":"andz","email":"zegg90@gmail.com"}],"dist":{"shasum":"f8714313dded3ef106295b26e3d240a5ba687130","tarball":"https://registry.npmjs.org/paypal-ipn/-/paypal-ipn-2.0.0.tgz","integrity":"sha512-psGjwTLFMezABGUnlHff1QuQjHucxGMDPM6KmiUQH08dd1VyMXU9/1eOhL9w0Fa26QsC+k7pFKRNHI9AvLgPZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPVMenX+o37AEPT1rFti92UCp1gYcH2D6D/t5OZvxZZgIgOti7OvWS6izF5CP06BV/9C19NhSpJdcZNgjjHb+wUdg="}]}},"3.0.0":{"name":"paypal-ipn","version":"3.0.0","description":"Package for verifying Paypal IPN messages","keywords":["paypal","ipn","payment"],"contributors":[{"name":"Chun-hao Hu","email":"hu.chunhao@gmail.com","url":"http://blog.huchunhao.com"}],"bugs":{"url":"https://github.com/andzdroid/paypal-ipn/issues"},"repository":{"type":"git","url":"git@github.com:andzdroid/paypal-ipn.git"},"dependencies":{},"main":"index","scripts":{"test":"nodeunit tests"},"engines":["node"],"devDependencies":{"nodeunit":"^0.9.0"},"homepage":"https://github.com/andzdroid/paypal-ipn","_id":"paypal-ipn@3.0.0","_shasum":"749a8af0f91487ca7bdb190cd06553a1392ab08a","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"andz","email":"zegg90@gmail.com"},"maintainers":[{"name":"andz","email":"zegg90@gmail.com"}],"dist":{"shasum":"749a8af0f91487ca7bdb190cd06553a1392ab08a","tarball":"https://registry.npmjs.org/paypal-ipn/-/paypal-ipn-3.0.0.tgz","integrity":"sha512-bgkkjPs1/YtWuy08JPTrND2FE458fE/sc7hVbMJ6abjmpH3gu8co8kh6Cyw/6OxHWienpydCY4+ObaEFr5kmhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBzXFQ1H8TEqCFOwSTwo56GjBpFgCT93kARv68zOi0Y/AiAOQmQSsSftREfCLVCY1U5NWEX5qPw4/xRxYnAQe21JVg=="}]}}},"maintainers":[{"name":"andz","email":"zegg90@gmail.com"}],"time":{"modified":"2022-06-23T15:43:08.599Z","created":"2011-05-30T14:47:33.688Z","1.0.0":"2011-05-30T14:47:34.472Z","1.0.1":"2011-06-08T19:10:16.248Z","2.1.0":"2014-11-03T10:20:09.554Z","2.0.0":"2014-11-03T10:25:49.464Z","3.0.0":"2014-11-19T16:02:43.209Z"},"readme":"# PayPal IPN Verification\n\nA simple NodeJS package for verifying PayPal IPN messages.\n\n## Installation\n```sh\n$ npm install paypal-ipn\n```\n\n## Usage\nThere is only one function, `verify`, which is used to verify any IPN messages you receive:\n\n```javascript\nipn.verify(ipn_params, [settings], callback);\n```\n\n`ipn_params` is the dictionary of POST values sent to your IPN script by PayPal. Don't modify the dict in any way, just pass it directly to `ipn.verify` to check if the IPN message is valid.\n\n\nExample code:\n\n```javascript\n// Must respond to PayPal IPN request with an empty 200 first\n// If using Express, uncomment the following:\n// res.send(200);\n\nvar ipn = require('paypal-ipn');\n\nipn.verify(params, function callback(err, msg) {\n  if (err) {\n    console.error(err);\n  } else {\n    // Do stuff with original params here\n\n    if (params.payment_status == 'Completed') {\n      // Payment has been confirmed as completed\n    }\n  }\n});\n\n//You can also pass a settings object to the verify function:\nipn.verify(params, {'allow_sandbox': true}, function callback(err, mes) {\n  //The library will attempt to verify test payments instead of blocking them\n});\n```\n\nNote that all the package does is confirm that the IPN message is valid. After this, you will still need to make some more checks:\n\n* Confirm that the `payment_status` is `Completed`.\n\n* Use the transaction ID to verify that the transaction has not already been processed, which prevents duplicate transactions from being processed.\n\n* Validate that the receiver's email address is registered to you.\n\n* Verify that the price, item description, and so on, match the transaction on your website.\n\nYou can find more information on the [PayPal documentation for IPN](https://cms.paypal.com/cgi-bin/marketingweb?cmd=_render-content&content_ID=developer/e_howto_admin_IPNIntro).\n\n### Settings\n\nOptional settings:\n\n```\n{\n  'allow_sandbox': false\n}\n```\n\n#### allow_sandbox\n\nIf this is true, the library will attempt to verify sandbox requests at PayPal's sandbox URL.\n\nIf this is false, the library will callback with an error without checking PayPal. (This is the default value.)\n\n**You should set this to false on production servers.**\n\n### The callback\nThe callback has two parameters, `err` and `msg`.\n\nIf `err` is null then the IPN is valid and you can continue processing the payment. `msg` is always `VERIFIED` then.\n\nIn case IPN was invalid or the http request failed `err` holds the Error object.\n\n### Express\n`paypal-ipn` works fine with [Express](http://expressjs.com/) or any other web framework.\n\nAll you need to do is pass in the request parameters to `ipn.verify`.\n\nIn Express, the request parameters are in `req.body`:\n\n```javascript\nipn.verify(req.body, callback_function);\n```\n","homepage":"https://github.com/andzdroid/paypal-ipn","keywords":["paypal","ipn","payment"],"repository":{"type":"git","url":"git@github.com:andzdroid/paypal-ipn.git"},"contributors":[{"name":"Chun-hao Hu","email":"hu.chunhao@gmail.com","url":"http://blog.huchunhao.com"}],"bugs":{"url":"https://github.com/andzdroid/paypal-ipn/issues"},"readmeFilename":"README.md","users":{"yi":true,"andreaspag":true,"mdix":true,"sorin89":true,"sharper":true}}