forked from MadisonReed/amazon-payments
-
Notifications
You must be signed in to change notification settings - Fork 1
/
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": "[email protected]"
},
"description": "API wrapper for Amazon Payments",
"version": "0.2.7",
"main": "amazonPayments.js",
"repository": {
"type": "git",
"url": "https://github.com/MadisonReed/amazon-payments"
},
"contributors": [
{
"name": "Scott Stokes",
"email": "[email protected]"
}
],
"keywords": [
"amazon",
"payments",
"MWS"
],
"dependencies": {
"request": "^2.85.0",
"xml2js": "0.4.4"
},
"devDependencies": {
"mocha": "1.17.1"
},
"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"
}