-
Notifications
You must be signed in to change notification settings - Fork 15
/
package.json
42 lines (42 loc) · 3.16 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
"name": "amazon-payments",
"author": {
"name": "Scott Stokes",
"email": "scottspork@gmail.com"
},
"description": "API wrapper for Amazon Payments",
"version": "0.2.9",
"main": "amazonPayments.js",
"repository": {
"type": "git",
"url": "https://github.com/MadisonReed/amazon-payments"
},
"contributors": [
{
"name": "Scott Stokes",
"email": "scottspork@gmail.com"
}
],
"keywords": [
"amazon",
"payments",
"MWS"
],
"dependencies": {
"request": "^2.88.0",
"xml2js": "0.4.4"
},
"devDependencies": {
"mocha": "^9.0.3"
},
"engines": {
"node": ">=0.10.20"
},
"license": "MIT",
"readme": "## Installation:\n\n``` sh\nnpm install amazon-payments\n```\n\n## Usage:\n\nInitialize the amazonPayment object with the environment variable, and all required config parameters.\n\nThe `amazonPayments.Environment` object contains two properties: `Production` and `Sandbox`, pass one of these in the configuration object.\n\n__Example:__\n\n``` js\nvar amazonPayments = require('amazon-payments');\nvar payment = amazonPayments.connect({\n environment: amazonPayments.Environment.Production,\n sellerId: 'Amazon Seller ID',\n mwsAccessKey: 'MWS Access Key',\n mwsSecretKey: 'MWS Secret Key',\n clientId: 'Client ID'\n});\n```\n\n## Note about request parameters\n\nThis module will automatically sign all requests and convert nested objects to dot notation.\n\n__Example:__\n``` js\npayment.offAmazonPayments.refund({\n AmazonCaptureId: 'Amazon capture ID',\n RefundReferenceId: 'Refund Reference ID',\n RefundAmount: {\n Amount: 123.45,\n CurrencyCode: 'USD'\n }\n}, function(err) {\n console.log(err);\n})\n```\nWill make a call with the following parameters:\n``` json\n{\n \"AmazonCaptureId\": \"Amazon capture ID\",\n \"RefundReferenceId\": \"Refund Reference ID\",\n \"RefundAmount.Amount\": 123.45,\n \"RefundAmount.CurrencyCode\": \"USD\"\n}\n```\n\n## api.getTokenInfo(accessToken, callback)\n\ngetTokenInfo takes two parameters: accesToken and callback. [More Info](http://docs.developer.amazonservices.com/en_US/apa_guide/APAGuide_ObtainProfile.html)\n\ncallback: err, tokenInfo\n\n__Example:__\n\n``` js\npayment.api.getTokenInfo('access token from button', function(err, tokenInfo) {\n console.log(tokenInfo);\n});\n```\n\n## api.getProfile(accessToken, callback)\n\ngetProfile takes two parameters: accesToken and callback. [More Info](http://docs.developer.amazonservices.com/en_US/apa_guide/APAGuide_ObtainProfile.html)\n\ncallback: err, profile\n\n__Example:__\n\n``` js\npayment.api.getProfile('access token from button', function(err, profile) {\n console.log(profile);\n});\n```\n\n\n## offAmazonPayments.*\n\nAll the methods in the offAmazonPayments object take two parameters: params and callback. \nThe functions are all named the same as their respective API calls, except with a lowercase first letter.\n[More Info](http://docs.developer.amazonservices.com/en_US/off_amazon_payments/OffAmazonPayments_Overview.html)",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/MadisonReed/amazon-payments/issues"
},
"homepage": "https://github.com/MadisonReed/amazon-payments"
}