payrex-node 1.7.2 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/entities/PaymentEntity.js +1 -0
- package/test2.js +5 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ function PaymentEntity(apiResource) {
|
|
|
16
16
|
this.customer = data.customer
|
|
17
17
|
this.paymentMethod = data.payment_method
|
|
18
18
|
this.refunded = data.refunded
|
|
19
|
+
this.pageSession = data.page_session
|
|
19
20
|
this.createdAt = data.created_at;
|
|
20
21
|
this.updatedAt = data.updated_at;
|
|
21
22
|
}
|
package/test2.js
CHANGED
|
@@ -27,6 +27,8 @@ const ResourceNotFoundError = require('./src/errors/ResourceNotFoundError');
|
|
|
27
27
|
(async () => {
|
|
28
28
|
try {
|
|
29
29
|
const paymentIntent = await payrex.paymentIntents.create({ amount: 10000 });
|
|
30
|
+
|
|
31
|
+
const payment = await payrex.payments.retrieve('pay_kYgpLcUFcQXS3Xb96VRABEZjuoS4DUeQ');
|
|
30
32
|
} catch (error) {
|
|
31
33
|
console.log('caught error!');
|
|
32
34
|
console.log(error.name);
|
|
@@ -65,4 +67,6 @@ const billingStatement = await payrex.billingStatements.create(
|
|
|
65
67
|
},
|
|
66
68
|
setup_future_usage: 'on_session'
|
|
67
69
|
}
|
|
68
|
-
)
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
const paymentIntent = await payrex.paymentIntents.cancel('pi_2oB1X4co8y1ZEotscXJnPGC8meXCptx8');
|