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
A JavaScript SDK (written in TypeScript) - For more information about the API as well as NodeJS code samples check out the [full API documentation](http://docs.paymentrails.com)
3
+
Trolley's JavaScript SDK (written in TypeScript) - For more information about the API as well as NodeJS code samples check out the [full API documentation](https://docs.trolley.com)
4
4
5
-
[^1]: [Payment Rails is now Trolley](https://www.trolley.com/payment-rails-is-now-trolley-series-a), we'll be updating our SDKs to support the new domain during the first half of 2022.
5
+
[^1]: [Payment Rails is now Trolley](https://www.trolley.com/payment-rails-is-now-trolley-series-a). We're in the process of updating our SDKs to support the new domain. In this transition phase, you might still see "PaymentRails" at some places.
6
6
7
7
## Installation
8
8
9
9
npm install --save paymentrails
10
10
11
11
## Getting Started
12
12
13
-
The Payment Rails API is built using promises and all methods except
13
+
The Trolley API is built using promises and all methods except
14
14
connect will return a promise. The connect call allows you to setup
15
15
your API Key and Secret with a client that can be used for subsequent
16
16
calls.
17
17
18
18
```js
19
-
// A simple application using the Payment Rails SDK
20
-
constpaymentrails=require('paymentrails');
19
+
// A simple application using the Trolley/Payment Rails SDK
Methods should all have JSDoc comments to help you understand their usage. As mentioned the [full API documentation](http://docs.paymentrails.com)
49
+
Methods should all have JSDoc comments to help you understand their usage. As mentioned the [full API documentation](https://docs.trolley.com)
50
50
is the best source of information about the API.
51
51
52
52
For more information please read the [JavaScript API docs](https://github.com/PaymentRails/javascript-sdk/blob/master/docs/) is available. The best starting point is:
@@ -58,18 +58,19 @@ For more information please read the [JavaScript API docs](https://github.com/Pa
58
58
| Recipient |[API Docs for Recipient](https://github.com/PaymentRails/javascript-sdk/blob/master/docs/classes/recipientgateway.md)|
59
59
| Recipient Account |[API Docs for Recipient Account](https://github.com/PaymentRails/javascript-sdk/blob/master/docs/classes/recipientaccountgateway.md)|
60
60
61
-
####Running Integration / Unit tests
61
+
### Running Integration / Unit tests
62
62
63
-
If you're working on the library itself, here's easy way to run the unit tests. They are designed to be run with configuration coming through environment variables.
63
+
If you're working on the library itself, here's easy way to run the tests.
64
64
65
-
*``PR_ACCESS_KEY``
66
-
*``PR_SECRET_KEY``
67
-
*``PR_ENVIRONMENT``
65
+
```
66
+
// if not already, copy the example env file to create an env file
*Defined in [BatchGateway.ts:95](https://github.com/PaymentRails/javascript-sdk/blob/c3121c6/lib/BatchGateway.ts#L95)*
51
51
52
-
Creates a batch with optional payments. This is the interface that is provide by the [Create Batch](http://docs.paymentrails.com/api/#create-a-batch) API
52
+
Creates a batch with optional payments. This is the interface that is provide by the [Create Batch](https://docs.trolley.com/api/#create-a-batch) API
53
53
54
54
const batch = await client.batch.create({
55
55
description: "My Batch",
@@ -89,7 +89,7 @@ Retrieves a batch based on the batch id
89
89
90
90
| Param | Type | Description |
91
91
| ------ | ------ | ------ |
92
-
| batchId |`string`|Payment Rails payment id (e.g. "B-xx999bb") |
92
+
| batchId |`string`|Trolley payment id (e.g. "B-xx999bb") |
93
93
94
94
**Returns:**`Promise`<`Batch`>
95
95
@@ -108,7 +108,7 @@ Generate a FX quote for this batch
108
108
109
109
| Param | Type | Description |
110
110
| ------ | ------ | ------ |
111
-
| batchId |`string`|Payment Rails payment id (e.g. "B-xx999bb") |
111
+
| batchId |`string`|Trolley payment id (e.g. "B-xx999bb") |
112
112
113
113
**Returns:**`Promise`<`Batch`>
114
114
@@ -127,7 +127,7 @@ Return a paginated list of payments for this batch
0 commit comments