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
Copy file name to clipboardExpand all lines: docs/charge-with-marketplace.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ gerencianet
44
44
.catch(console.log);
45
45
```
46
46
47
-
The attribute `payee_code` identifies a Gerencianet account, just like in [creating charges with shippings](https://github.com/franciscotfmc/gn-api-sdk-node/tree/master/docs/charge-with-shippings.md). In order to get someone else's `payee_code` you need to ask the account owner. There is no other way. To visualize yours, log in your Gerencianet account and search for *account code* under *Dados Cadastrais*.
47
+
The attribute `payee_code` identifies a Gerencianet account, just like in [creating charges with shippings](https://github.com/franciscotfmc/gn-api-sdk-node/tree/master/docs/charge-with-shippings.md). In order to get someone else's `payee_code` you need to ask the account owner. There is no other way. To visualize yours, log in your Gerencianet account and search for *Identificador de Conta* under *Dados Cadastrais*.
48
48
49
49
In the example above, there are two repasses, both of 25%, but each one for a different account, whereas the `payee_code` differs. The integrator account will receive, at the end, 50% of the total value. Disregarding the rates, the integrator account would receive R$5,00. The other two accounts would receive R$ 2,50 each.
Copy file name to clipboardExpand all lines: docs/payment-data.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
## Payment methods - listing installments
1
+
## Payment data - listing installments
2
2
3
3
If you ever need to get the total value for a charge, including rates and interests, as well as each installment value, even before the payment itself, you can.
4
4
@@ -9,15 +9,15 @@ Sometimes you need to check the total for making a discount, or simple to show a
9
9
Stop bragging about. Here is the code:
10
10
11
11
```js
12
-
varpaymentMethodInput= {
13
-
method:'visa',
12
+
varpaymentDataInput= {
13
+
type:'visa',
14
14
total:5000
15
15
}
16
16
17
17
var gerencianet =newGerencianet(options);
18
18
19
19
gerencianet
20
-
.getPaymentMethods(paymentMethodInput)
20
+
.getPaymentData(paymentDataInput)
21
21
.then(console.log)
22
22
.catch(console.log);
23
23
```
@@ -27,7 +27,7 @@ And the response:
27
27
```js
28
28
{
29
29
"code":200,
30
-
"method": {
30
+
"data": {
31
31
"rate":150,
32
32
"interest_percentage":0,
33
33
"name":"visa",
@@ -109,13 +109,13 @@ And the response:
109
109
}
110
110
```
111
111
112
-
Observe that the response comes with an installments array of 12 positions. Each position matches one possible option of installment number, containing its value in currency and integer forms. Use it any way you need.
112
+
Observe that the response comes with an installments array of 12 positions at maximum. Each position matches one possible option of installment number, containing its value in currency and integer forms. The number of installments will vary according to the selected brand. Use it any way that suits your needs.
113
113
114
114
If you're curious about what would happen if you did this:
115
115
116
116
```js
117
-
varpaymentMethodInput= {
118
-
method:'bol',
117
+
varpaymentDataInput= {
118
+
type:'banking_billet',
119
119
total:5000
120
120
}
121
121
```
@@ -125,12 +125,12 @@ Here it goes:
125
125
```js
126
126
{
127
127
"code":200,
128
-
"method": {
128
+
"data": {
129
129
"total":5150,
130
130
"rate":150,
131
131
"currency":"51,50"
132
132
}
133
133
}
134
134
```
135
135
136
-
As the payment method being a boleto, the response comes with just the total value and the rate that was applied. The total value comes also parsed in currency, just in case.
136
+
As the payment type being *banking billet*, the response comes with just the total value and the rate that was applied. The total value comes also parsed in currency, just in case.
Copy file name to clipboardExpand all lines: docs/payments.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,11 @@ var Gerencianet = require('gn-api-sdk-node');
7
7
var gerencianet =newGerencianet(options);
8
8
```
9
9
10
-
There are two ways of giving sequence to a charge. One can generate a boleto so it is payable until its due date, or one can use its credit card to approve the payment.
10
+
There are two ways of giving sequence to a charge. One can generate a **banking billet**so it is payable until its due date, or one can use its **credit card** to approve the payment.
11
11
12
-
### 1. Boletos
12
+
### 1. Banking billets
13
13
14
-
Generating a bol from a charge is deadly simple. Provide the charge id and an optional expiration date:
14
+
Generating banking billets from a charge is deadly simple. Provide the charge id and an optional expiration date:
15
15
16
16
```js
17
17
var tenDaysFromNow =moment()
@@ -21,7 +21,7 @@ var tenDaysFromNow = moment()
21
21
var paymentInput = {
22
22
charge_id:242,
23
23
payment: {
24
-
bol: {
24
+
banking_billet: {
25
25
expire_at: tenDaysFromNow
26
26
}
27
27
}
@@ -34,26 +34,26 @@ gerencianet
34
34
.done();
35
35
```
36
36
37
-
If you don't need to supply the `expire_at` attribute, keep the `bol` object empty like this:
37
+
If you don't need an expiration date, keep the `banking_billet` object empty like this:
38
38
39
39
```js
40
40
var paymentInput = {
41
41
charge_id:242,
42
42
payment: {
43
-
bol: {}
43
+
banking_billet: {}
44
44
}
45
45
}
46
46
```
47
47
48
-
You'll receive the payment info in the callback, such as the barcode and the bol link:
48
+
You'll receive the payment info in the callback, such as the barcode and the billet link:
@@ -63,7 +63,7 @@ You'll receive the payment info in the callback, such as the barcode and the bol
63
63
64
64
### 2. Credit card
65
65
66
-
The most common payment method is to use a credit card in order to make things happen faster. Paying a charge with a credit card in Gerencianet is as simples as generating a boleto, as seen above.
66
+
The most common payment method is to use a credit card in order to make things happen faster. Paying a charge with a credit card in Gerencianet is as simples as generating a banking billet, as seen above.
67
67
68
68
The difference here is that we need to provide some extra information, as a `billing_address` and a `payment_token`. The former is used to make an anti-fraud analyze before accepting/appoving the payment, the latter identifies a credit card at Gerencianet, so that you don't need to bother about keeping track of credit card numbers. The `installments` attribute is self-explanatory.
69
69
@@ -95,7 +95,7 @@ gerencianet
95
95
.done();
96
96
```
97
97
98
-
If everything went well, the response will come with the total value, installments number e the value of each installment:
98
+
If everything went well, the response will come with the total value, installments number and the value of each installment:
0 commit comments