@rye-api/rye-pay
Advanced tools
Comparing version 0.8.4 to 0.9.0
@@ -61,6 +61,6 @@ "use strict"; | ||
taxes: { | ||
amount: selectedShippingMethod.taxes.value, | ||
amount: Number(selectedShippingMethod.taxes.value) / 100, | ||
}, | ||
total: { | ||
amount: selectedShippingMethod.total.value, | ||
amount: Number(selectedShippingMethod.total.value) / 100, | ||
}, | ||
@@ -255,3 +255,3 @@ }; | ||
label: this.applePayInputParams.merchantDisplayName ?? '', | ||
amount: finalAmount, | ||
amount: `${finalAmount}`, | ||
}; | ||
@@ -258,0 +258,0 @@ const newLineItems = [ |
@@ -52,3 +52,12 @@ import { RyeStore } from './types'; | ||
export interface InitParams extends SpreedlyInitParams { | ||
/** | ||
* @deprecated Use `generateJWT` instead. This field will be removed in the next major release. | ||
*/ | ||
apiKey?: string; | ||
/** | ||
* This method should hit an endpoint on your backend which generates a valid JWT | ||
* for use in frontend requests to the Rye API. | ||
* | ||
* @see https://docs.rye.com/jwt-authentication | ||
*/ | ||
generateJWT?: () => Promise<string>; | ||
@@ -71,2 +80,6 @@ numberEl: string; | ||
variantId?: string; | ||
/** | ||
* @deprecated This field is not required when using JWT authentication. | ||
* @see {@link InitParams.generateJWT} | ||
*/ | ||
shopperIp?: string; | ||
@@ -90,2 +103,6 @@ merchantDisplayName: string; | ||
cartId: string; | ||
/** | ||
* @deprecated This field is not required when using JWT authentication. | ||
* @see {@link InitParams.generateJWT} | ||
*/ | ||
shopperIp: string; | ||
@@ -109,2 +126,6 @@ } | ||
selectedShippingOptions?: SelectedShippingOption[]; | ||
/** | ||
* @deprecated This field is not required when using JWT authentication. | ||
* @see {@link InitParams.generateJWT} | ||
*/ | ||
shopperIp?: string; | ||
@@ -117,2 +138,6 @@ experimentalPromoCodes?: StorePromoCodes[]; | ||
selectedShippingOptions?: string; | ||
/** | ||
* @deprecated This field is not required when using JWT authentication. | ||
* @see {@link InitParams.generateJWT} | ||
*/ | ||
shopperIp?: string; | ||
@@ -119,0 +144,0 @@ experimentalPromoCodes?: string; |
{ | ||
"name": "@rye-api/rye-pay", | ||
"version": "0.8.4", | ||
"version": "0.9.0", | ||
"description": "This package contains the Rye payment client required to perform checkout using Rye Cart-API", | ||
@@ -13,7 +13,7 @@ "repository": { | ||
"scripts": { | ||
"test": "echo \"There is no tests in this package\"", | ||
"build": "tsc", | ||
"bundle": "mkdir -p public && browserify ./src/index.ts -p [ tsify --noImplicitAny ] -s rye > ./public/rye-pay.js", | ||
"check-format": "prettier --check \"**/*.ts\"", | ||
"format": "prettier --write \"**/*.ts\"", | ||
"build": "tsc", | ||
"bundle": "mkdir -p public && browserify ./src/index.ts -p [ tsify --noImplicitAny ] -s rye > ./public/rye-pay.js" | ||
"test": "echo \"There is no tests in this package\"" | ||
}, | ||
@@ -35,3 +35,7 @@ "author": "RYE", | ||
"tsify": "^5.0.4" | ||
}, | ||
"volta": { | ||
"node": "20.12.1", | ||
"yarn": "1.22.22" | ||
} | ||
} |
@@ -97,2 +97,8 @@ # rye-pay | ||
> NOTE: Please pass in the billing address, not the shipping address. | ||
> The address that is stored in the Rye Cart, is the shipping address. | ||
> The address that will be passed in the `paymentDetails` object, is the billing address. | ||
`paymentDetails` is an object with the following fields: | ||
@@ -99,0 +105,0 @@ |
137992
2260
311