ordering-ui-react-native 0.21.23-release → 0.21.24-release

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.21.23-release",
3
+ "version": "0.21.24-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -17,7 +17,8 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
17
17
  methodPaySupported,
18
18
  setPlaceByMethodPay,
19
19
  cartTotal,
20
- androidAppId
20
+ androidAppId,
21
+ businessNames
21
22
  } = props
22
23
  const { initGooglePay, createGooglePayPaymentMethod, loading } = useGooglePay();
23
24
  const { presentApplePay, isApplePaySupported } = useApplePay();
@@ -152,7 +153,8 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
152
153
 
153
154
  const { error, paymentMethod } = await presentApplePay({
154
155
  cartItems: [{
155
- label: t('CART_APPLE_PAY_LABEL', 'Cart'),
156
+ label: businessNames ? `${businessNames.join(', ')} ${t('VIA_CHEW_APP', 'via Chew App')}`
157
+ : `${cart?.business?.name} ${t('VIA_CHEW_APP', 'via Chew App')}`,
156
158
  amount: cartTotal?.toString?.() ?? cart?.balance?.toString() ?? cart?.total?.toString?.(),
157
159
  paymentType: 'Immediate'
158
160
  }],
@@ -495,5 +495,6 @@ export interface StripeMethodFormParams {
495
495
  methodPaySupported?: any,
496
496
  setPlaceByMethodPay?: any,
497
497
  cartTotal?: number,
498
- androidAppId?: string
498
+ androidAppId?: string,
499
+ businessNames?: Array<string>
499
500
  }
@@ -233,6 +233,7 @@ const MultiCartsPaymethodsAndWalletsUI = (props: any) => {
233
233
  toSave
234
234
  businessId={businessIds[0]}
235
235
  businessIds={businessIds}
236
+ businessNames={openCarts?.map?.((cart : any) => cart?.business?.name)}
236
237
  publicKey={paymethodSelected?.data?.publishable}
237
238
  requirements={props.clientSecret}
238
239
  handleSource={handlePaymethodDataChange}
@@ -36,7 +36,8 @@ const StripeElementsFormUI = (props: any) => {
36
36
  cartTotal,
37
37
  publicKeyAddCard,
38
38
  urlScheme,
39
- androidAppId
39
+ androidAppId,
40
+ businessNames
40
41
  } = props;
41
42
 
42
43
  const theme = useTheme();
@@ -228,6 +229,7 @@ const StripeElementsFormUI = (props: any) => {
228
229
  methodPaySupported={methodPaySupported}
229
230
  setPlaceByMethodPay={setPlaceByMethodPay}
230
231
  androidAppId={androidAppId}
232
+ businessNames={businessNames}
231
233
  />
232
234
  ) : (
233
235
  <CardField