UNPKG

uz-pay-sdk

Version:

🚀 Universal Payment SDK for Uzbekistan - Integrate Payme, Click, UzCard, Humo & Apelsin with one simple API. Battle-tested, production-ready, 95% faster integration.

109 lines • 4.39 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.CancelPaymentDto = exports.CheckPaymentDto = exports.CreatePaymentDto = void 0; const class_validator_1 = require("class-validator"); const swagger_1 = require("@nestjs/swagger"); class CreatePaymentDto { } exports.CreatePaymentDto = CreatePaymentDto; __decorate([ (0, swagger_1.ApiProperty)({ description: 'Payment provider', enum: ['payme', 'click', 'uzcard', 'humo', 'apelsin'], example: 'payme', }), (0, class_validator_1.IsString)(), (0, class_validator_1.IsIn)(['payme', 'click', 'uzcard', 'humo', 'apelsin']), __metadata("design:type", String) ], CreatePaymentDto.prototype, "provider", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'Payment amount in UZS tiyin (1 UZS = 100 tiyin)', minimum: 1, example: 50000, }), (0, class_validator_1.IsNumber)(), (0, class_validator_1.Min)(1), __metadata("design:type", Number) ], CreatePaymentDto.prototype, "amount", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'Unique order identifier', example: 'ORDER_123456', }), (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CreatePaymentDto.prototype, "orderId", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Payment description', example: 'Payment for order #123456', }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CreatePaymentDto.prototype, "description", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Currency code', example: 'UZS', }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CreatePaymentDto.prototype, "currency", void 0); __decorate([ (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CreatePaymentDto.prototype, "returnUrl", void 0); __decorate([ (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CreatePaymentDto.prototype, "phoneNumber", void 0); __decorate([ (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CreatePaymentDto.prototype, "cardNumber", void 0); class CheckPaymentDto { } exports.CheckPaymentDto = CheckPaymentDto; __decorate([ (0, class_validator_1.IsString)(), (0, class_validator_1.IsIn)(['payme', 'click', 'uzcard', 'humo', 'apelsin']), __metadata("design:type", String) ], CheckPaymentDto.prototype, "provider", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CheckPaymentDto.prototype, "transactionId", void 0); class CancelPaymentDto { } exports.CancelPaymentDto = CancelPaymentDto; __decorate([ (0, class_validator_1.IsString)(), (0, class_validator_1.IsIn)(['payme', 'click', 'uzcard', 'humo', 'apelsin']), __metadata("design:type", String) ], CancelPaymentDto.prototype, "provider", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CancelPaymentDto.prototype, "transactionId", void 0); __decorate([ (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsNumber)(), (0, class_validator_1.Min)(1), __metadata("design:type", Number) ], CancelPaymentDto.prototype, "amount", void 0); //# sourceMappingURL=payment.dto.js.map