Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guideline 3.1.6 - Business - Payments - Apple Pay #1610

Open
LukakHR opened this issue Feb 14, 2024 · 1 comment
Open

Guideline 3.1.6 - Business - Payments - Apple Pay #1610

LukakHR opened this issue Feb 14, 2024 · 1 comment

Comments

@LukakHR
Copy link

LukakHR commented Feb 14, 2024

Is your feature request related to a problem? Please describe.
Yes, our app keeps being rejected in AppStore due to Guideline 3.1.6 - Business - Payments - Apple Pay. Full description:

Your app still uses Apple Pay as a purchasing mechanism but does not use the appropriate branding and user interface elements to provide the consistent experience users expect with Apple Pay. Specifically:

  • Your app acts as an intermediary between users and a third-party business, but the business receiving the payment is not specified on the payment sheet. The Apple Pay payment sheet should list your app as an intermediary and the business receiving the payment. For example: "PAY END_MERCHANT_NAME (VIA YOUR_APP_NAME)."

I haven't been able to find any way to add this data to the payment sheet presented with initPaymentSheet and presentPaymentSheet

Describe the solution you'd like
I would like an option to add such a description to the sheet to satisfy Apple requirements

Describe alternatives you've considered
I haven't found any alternatives as Apple is insisting we add this and I haven't been able to find anything in the params that would resemble this feature. In the current state, our app basically can't be released.

@tux2nicolae
Copy link

tux2nicolae commented Feb 14, 2024

Hi LukakHR, you need to add an extra item at the end of your iosCartItems, something like this:

const iosCartItems: Array<ApplePay.CartSummaryItem> = order.items
  .map((item: {name: string; price: number; quantity: number}) => ({
    paymentType: 'Immediate',
    label: `${item.quantity} x ${item.name}`,
    amount: item.price.toFixed(2),
  }))
  // last item is total
  // https://developer.apple.com/documentation/passkit/pkpaymentrequest/1619231-paymentsummaryitems
  // 1. Set the grand total amount to the sum of all the other items in the array.
  // 2. Set the grand total label to the name of your company.
  .concat([
    {
      paymentType: 'Immediate',
      label: `${bussinessName} (via Menoo)`,
      amount: order.total.toFixed(2),
    },
  ]);
  
const {error} = await initPaymentSheet({
  ...
  applePay: {
    merchantCountryCode: 'RO',
    cartItems: iosCartItems,
  },
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants