You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* An Authorize.Net account (see _Registration & Configuration_ section below)
10
11
11
-
### Contribution
12
+
### Contribution
13
+
12
14
- If you need information or clarification about Authorize.Net features, create an issue with your question. You can also search the [Authorize.Net developer community](https://community.developer.authorize.net/) for discussions related to your question.
15
+
13
16
- Before creating pull requests, please read [the contributors guide](CONTRIBUTING.md).
14
17
15
18
### TLS 1.2
16
-
The Authorize.Net APIs only support connections using the TLS 1.2 security protocol. Make sure to upgrade all required components to support TLS 1.2. Keep these components up to date to mitigate the risk of new security flaws.
17
19
20
+
The Authorize.Net APIs only support connections using the TLS 1.2 security protocol. Make sure to upgrade all required components to support TLS 1.2. Keep these components up to date to mitigate the risk of new security flaws.
18
21
19
22
## Installation
20
-
To install AuthorizeNet
23
+
24
+
To install AuthorizeNet
21
25
22
26
`npm install authorizenet`
23
27
24
28
25
29
## Registration & Configuration
30
+
26
31
Use of this SDK and the Authorize.Net APIs requires having an account on the Authorize.Net system. You can find these details in the Settings section.
32
+
27
33
If you don't currently have a production Authorize.Net account, [sign up for a sandbox account](https://developer.authorize.net/sandbox/).
28
34
29
35
### Authentication
36
+
30
37
To authenticate with the Authorize.Net API, use your account's API Login ID and Transaction Key. If you don't have these credentials, you can obtain them from our Merchant Interface site. For production accounts, the Merchant Interface is located at (https://account.authorize.net/); and for sandbox accounts, at (https://sandbox.authorize.net).
31
38
32
39
Once you have your keys simply load them into the appropriate variables in your code, as per the below sample code dealing with the authentication part of the API request.
33
40
34
41
#### To set your API credentials for an API request:
42
+
35
43
```javascript
36
44
var merchantAuthenticationType =newApiContracts.MerchantAuthenticationType();
An authentication test sample is provided and can be run with the following command:
50
+
42
51
`node sample/test.js`
43
52
44
53
Never include your Login ID and Transaction Key directly in a file that's in a publicly accessible portion of your website. As a best practice, define the API Login ID and Transaction Key in a constants file, and reference those constants in the appropriate place in your code.
45
54
46
55
### Switching between the sandbox environment and the production environment
47
-
Authorize.Net maintains a complete sandbox environment for testing and development purposes. The sandbox environment is an exact replica of our production environment, with simulated transaction authorization and settlement. By default, this SDK is configured to use with the sandbox environment. To switch to the production environment, call `setEnvironment` on the controller variable before execute. For example:
56
+
57
+
Authorize.Net maintains a complete sandbox environment for testing and development purposes. The sandbox environment is an exact replica of our production environment, with simulated transaction authorization and settlement. By default, this SDK is configured to use with the sandbox environment. To switch to the production environment, call `setEnvironment` on the controller variable before execute.
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
54
67
55
68
56
69
## SDK Usage Examples and Sample Code
70
+
57
71
When using this SDK, downloading the Authorize.Net sample code repository is recommended.
72
+
58
73
*[Authorize.Net Node.js Sample Code Repository (on GitHub)](https://github.com/AuthorizeNet/sample-code-node)
59
74
60
75
The repository contains comprehensive sample code for all common uses of the Authorize.Net API:
61
76
62
77
The API Reference contains details and examples of the structure and formatting of the Authorize.Net API.
78
+
63
79
*[Developer Center API Reference](http://developer.authorize.net/api/reference/index.html)
64
80
65
81
Use the examples in the API Reference to determine which methods and information to include in an API request using this SDK.
@@ -69,6 +85,7 @@ Use the examples in the API Reference to determine which methods and information
69
85
Use this method to authorize and capture a payment using a tokenized credit card number issued by Chase Pay. Chase Pay transactions are only available to merchants using the Paymentech processor.
70
86
71
87
The following information is required in the request:
88
+
72
89
-**payment token**
73
90
-**expiration date**
74
91
-**cryptogram** received from the token provider
@@ -77,6 +94,7 @@ The following information is required in the request:
77
94
-**tokenRequestorEci**
78
95
79
96
When using the SDK to submit Chase Pay transactions, consider the following points:
97
+
80
98
-`tokenRequesterName` must be populated with **`”CHASE_PAY”`**
81
99
-`tokenRequestorId` must be populated with the **`Token Requestor ID`** provided by Chase Pay services for each transaction during consumer checkout
82
100
-`tokenRequesterEci` must be populated with the **`ECI Indicator`** provided by Chase Pay services for each transaction during consumer checkout
@@ -85,16 +103,42 @@ When using the SDK to submit Chase Pay transactions, consider the following poin
2. Pass this `config` object to the controller constructor.
127
+
128
+
For example,
129
+
130
+
```javascript
131
+
var ctrl =newApiControllers.CreateTransactionController(createRequest.getJSON(), config);
132
+
```
133
+
93
134
### Testing Guide
135
+
94
136
For additional help in testing your own code, Authorize.Net maintains a [comprehensive testing guide](http://developer.authorize.net/hello_world/testing_guide/) that includes test credit card numbers to use and special triggers to generate certain responses from the sandbox environment.
95
137
96
138
### Transaction Hash Upgrade
139
+
97
140
Authorize.Net is phasing out the MD5 based `transHash` element in favor of the SHA-512 based `transHashSHA2`. The setting in the Merchant Interface which controlled the MD5 Hash option is no longer available, and the `transHash` element will stop returning values at a later date to be determined. For information on how to use `transHashSHA2`, see the [Transaction Hash Upgrade Guide] (https://developer.authorize.net/support/hash_upgrade/).
98
141
99
142
## License
143
+
100
144
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.
0 commit comments