@ngn-net/payment-provider-sdk 1.0.13 → 1.0.14

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.
@@ -118,6 +118,8 @@ export interface CreateCryptoIntentResponse {
118
118
  amount: number;
119
119
  payAdress: string;
120
120
  payAmount: number;
121
+ invoiceUrl?: string;
122
+ invoiceId?: string;
121
123
  }
122
124
  export interface EventResponse<T> {
123
125
  correlationId: string;
@@ -1,9 +1,12 @@
1
1
  import { PayCurrency } from "../entity/crypto.entity";
2
2
  export declare class CreateCryptoPaymentDto {
3
- orderId: string;
4
3
  amount: number;
5
- currency: PayCurrency;
6
- description?: string;
4
+ payCurrency?: PayCurrency;
7
5
  includeFee?: boolean;
6
+ orderId?: string;
7
+ orderDescription?: string;
8
8
  isFixedRate?: boolean;
9
+ successUrl?: string;
10
+ cancelUrl?: string;
11
+ partiallyPaidUrl?: string;
9
12
  }
@@ -16,40 +16,64 @@ const crypto_entity_1 = require("../entity/crypto.entity");
16
16
  class CreateCryptoPaymentDto {
17
17
  }
18
18
  exports.CreateCryptoPaymentDto = CreateCryptoPaymentDto;
19
- __decorate([
20
- (0, swagger_1.ApiProperty)(),
21
- (0, class_validator_1.IsNotEmpty)(),
22
- (0, class_validator_1.IsString)(),
23
- __metadata("design:type", String)
24
- ], CreateCryptoPaymentDto.prototype, "orderId", void 0);
25
19
  __decorate([
26
20
  (0, swagger_1.ApiProperty)({ example: 50 }),
27
- (0, class_validator_1.IsNotEmpty)(),
28
21
  (0, class_validator_1.IsNumber)(),
29
- (0, class_validator_1.Min)(50),
30
22
  __metadata("design:type", Number)
31
23
  ], CreateCryptoPaymentDto.prototype, "amount", void 0);
32
24
  __decorate([
33
- (0, swagger_1.ApiProperty)({ enum: crypto_entity_1.PayCurrency, example: crypto_entity_1.PayCurrency.usdt }),
34
- (0, class_validator_1.IsNotEmpty)(),
25
+ (0, swagger_1.ApiPropertyOptional)({
26
+ description: "optional — omit so the customer chooses the asset on the hosted invoice page",
27
+ enum: crypto_entity_1.PayCurrency,
28
+ example: crypto_entity_1.PayCurrency.usdt,
29
+ }),
30
+ (0, class_validator_1.IsOptional)(),
35
31
  (0, class_validator_1.IsEnum)(crypto_entity_1.PayCurrency),
36
32
  __metadata("design:type", String)
37
- ], CreateCryptoPaymentDto.prototype, "currency", void 0);
33
+ ], CreateCryptoPaymentDto.prototype, "payCurrency", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiPropertyOptional)({ example: false }),
36
+ (0, class_validator_1.IsOptional)(),
37
+ (0, class_validator_1.IsBoolean)(),
38
+ __metadata("design:type", Boolean)
39
+ ], CreateCryptoPaymentDto.prototype, "includeFee", void 0);
38
40
  __decorate([
39
- (0, swagger_1.ApiPropertyOptional)({ example: "giftcard order" }),
41
+ (0, swagger_1.ApiPropertyOptional)({ example: "order_123" }),
40
42
  (0, class_validator_1.IsOptional)(),
41
43
  (0, class_validator_1.IsString)(),
42
44
  __metadata("design:type", String)
43
- ], CreateCryptoPaymentDto.prototype, "description", void 0);
45
+ ], CreateCryptoPaymentDto.prototype, "orderId", void 0);
44
46
  __decorate([
45
- (0, swagger_1.ApiPropertyOptional)({ default: true }),
47
+ (0, swagger_1.ApiPropertyOptional)({ example: "Test order description" }),
46
48
  (0, class_validator_1.IsOptional)(),
47
- (0, class_validator_1.IsBoolean)(),
48
- __metadata("design:type", Boolean)
49
- ], CreateCryptoPaymentDto.prototype, "includeFee", void 0);
49
+ (0, class_validator_1.IsString)(),
50
+ __metadata("design:type", String)
51
+ ], CreateCryptoPaymentDto.prototype, "orderDescription", void 0);
50
52
  __decorate([
51
- (0, swagger_1.ApiPropertyOptional)({ default: true }),
53
+ (0, swagger_1.ApiPropertyOptional)({
54
+ description: "fixed-rate locks the quote but has a higher NP minimum (~$19); " +
55
+ "floating rate allows small-amount payments (e.g. $5 TRX)",
56
+ example: false,
57
+ }),
52
58
  (0, class_validator_1.IsOptional)(),
53
59
  (0, class_validator_1.IsBoolean)(),
54
60
  __metadata("design:type", Boolean)
55
61
  ], CreateCryptoPaymentDto.prototype, "isFixedRate", void 0);
62
+ __decorate([
63
+ (0, swagger_1.ApiPropertyOptional)({ example: "https://shop.test/success" }),
64
+ (0, class_validator_1.IsOptional)(),
65
+ (0, class_validator_1.IsString)(),
66
+ __metadata("design:type", String)
67
+ ], CreateCryptoPaymentDto.prototype, "successUrl", void 0);
68
+ __decorate([
69
+ (0, swagger_1.ApiPropertyOptional)({ example: "https://shop.test/cancel" }),
70
+ (0, class_validator_1.IsOptional)(),
71
+ (0, class_validator_1.IsString)(),
72
+ __metadata("design:type", String)
73
+ ], CreateCryptoPaymentDto.prototype, "cancelUrl", void 0);
74
+ __decorate([
75
+ (0, swagger_1.ApiPropertyOptional)({ example: "https://shop.test/partial" }),
76
+ (0, class_validator_1.IsOptional)(),
77
+ (0, class_validator_1.IsString)(),
78
+ __metadata("design:type", String)
79
+ ], CreateCryptoPaymentDto.prototype, "partiallyPaidUrl", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngn-net/payment-provider-sdk",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Payment provider SDK",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",