paypal-isomorphic-functions
Advanced tools
Comparing version 1.0.13 to 1.0.14
import { IPayPalAccessToken } from "../oauth/interfaces"; | ||
export declare function create(token: IPayPalAccessToken, data?: any, headers?: any): Promise<Response>; | ||
export declare function capture(token: IPayPalAccessToken, id: string, data?: any, headers?: any): Promise<Response>; | ||
export declare function capture(token: IPayPalAccessToken, id: string, version?: string, data?: any, headers?: any): Promise<Response>; |
@@ -19,3 +19,3 @@ "use strict"; | ||
exports.create = create; | ||
async function capture(token, id, data, headers) { | ||
async function capture(token, id, version = "v1", data, headers) { | ||
const payload = Object.keys(data).length > 0 ? data : constants_1.DEFAULT_PAYMENT_CAPTURE_PAYLOAD; | ||
@@ -31,5 +31,5 @@ const options = { | ||
}; | ||
return await fetch(`${config_1.CONFIG.get("PAYPAL_REST_HOSTNAME")}/v2/payments/authorizations/${id}/capture`, options); | ||
return await fetch(`${config_1.CONFIG.get("PAYPAL_REST_HOSTNAME")}/${version}/payments/authorizations/${id}/capture`, options); | ||
} | ||
exports.capture = capture; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "paypal-isomorphic-functions", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "Library of helpful paypal functions that can be run in a browser or server", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -34,2 +34,3 @@ import { IPayPalAccessToken } from "../oauth/interfaces"; | ||
id: string, | ||
version = "v1", | ||
data?: any, | ||
@@ -53,5 +54,5 @@ headers?: any | ||
"PAYPAL_REST_HOSTNAME" | ||
)}/v2/payments/authorizations/${id}/capture`, | ||
)}/${version}/payments/authorizations/${id}/capture`, | ||
options | ||
); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
371978
1467