Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@figuredev/payments-sdk

Package Overview
Dependencies
Maintainers
6
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@figuredev/payments-sdk - npm Package Compare versions

Comparing version 0.15.0 to 0.16.0

3

lib/index.d.ts
import { UserContext } from "./utils";
import { PaymentAuthTokenDTO, PaymentGatewayDTO, PaymentResponseDTO, PaymentRequestDTO, PaymentInitializedResponseDTO } from "./types";
import { PaymentAuthTokenDTO, PaymentGatewayDTO, PaymentInitializedResponseDTO, PaymentInputDTO, PaymentRequestDTO, PaymentResponseDTO } from "./types";
declare type PaymentsClientConfig = {

@@ -16,2 +16,3 @@ baseUrl: string;

void(ctx: UserContext, id: string, referenceId: string): Promise<PaymentInitializedResponseDTO>;
tokenize(ctx: UserContext, id: string, gateway: PaymentGatewayDTO, data: PaymentInputDTO): Promise<PaymentInitializedResponseDTO>;
cancel(ctx: UserContext, id: string): Promise<void>;

@@ -18,0 +19,0 @@ getPaymentInfo(ctx: UserContext, id: string): Promise<PaymentResponseDTO>;

@@ -113,2 +113,19 @@ "use strict";

}
tokenize(ctx, id, gateway, data) {
return __awaiter(this, void 0, void 0, function* () {
return yield axios_1.default
.request({
baseURL: this.config.baseUrl,
method: "POST",
url: `/payment/${id}`,
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx),
data: {
command: types_1.PaymentCommandDTO.Tokenize,
gateway: gateway,
input: data,
},
})
.then((r) => r.data);
});
}
cancel(ctx, id) {

@@ -115,0 +132,0 @@ return __awaiter(this, void 0, void 0, function* () {

{
"name": "@figuredev/payments-sdk",
"version": "0.15.0",
"version": "0.16.0",
"license": "ISC",

@@ -5,0 +5,0 @@ "files": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc