Девелоперский аккаунт apple для apple pay

An easier way to pay within apps and websites.

Apple Pay provides an easy and secure way to make payments in your iOS, iPadOS, and watchOS apps, and on websites in Safari. And now, Apple Pay can also be used in Messages for Business and in iMessage extensions. By using Face ID, Touch ID, or double-clicking Apple Watch, users can quickly and securely provide their payment, shipping, and contact information to check out. Customers love the simplicity of Apple Pay, and you’ll love the increased conversion rates and new user adoption that come with it.

Checkout is simpler.

Accepting Apple Pay is faster than accepting traditional credit and debit cards and other payment methods. Customers no longer need to spend time searching for their wallet or finding the right card. Within apps or websites your customers can check out with a single touch.

Express checkout

Customers can complete their purchase from a product page with a single tap, without the need to add to a cart or fill out a form.

Defaulting

Make checkout simple and fast by using Apple Pay as the default payment method. With Apple Pay as the default and prominent option, you can reduce cart abandonment and customer frustration, and increase conversion.

Inline setup

Users who have not yet provided a card can do so and pay immediately without leaving your app or website. Detect if customers are using an Apple Pay-capable device and offer to set up Apple Pay within the checkout process.

Источник

Implementing Apple Pay

Discover how to set up your developer account to support Apple Pay, verify that transactions are completed successfully, and make sure your implementation of Apple Pay follows guidelines for apps and the web.

Build your app and website.

Developer Account Setup

Learn about the identifiers and certificates in your Apple Developer account that are needed to implement Apple Pay for apps and websites. If you’re supporting Apple Pay in your app and website, we recommend using the same Merchant ID and certificate for both. Contact your payment service provider to confirm any additional transaction requirements applicable to your region.

Apple Pay for Apps

Get APIs for payment sheet interactions, authorization, updates, errors, and more.

Apple Pay on the Web

Safari supports two JavaScript APIs that let you accept Apple pay payments from customers on your website.

Apple Pay in Messages

Allow customers to pay quickly and easily with Apple Pay in an iMessage app or directly in a Messages for Business session.

Integrate, test, and verify.

E-Commerce Platforms and Payment Service Providers

The most popular e-commerce platforms and payment service providers support Apple Pay within apps and on the web. Use an Apple Pay SDK from a payment service provider to integrate Apple Pay in your app or website.

Apple Pay Web Merchant Registration API

Approved e-commerce platform and payment service providers can use the Apple Pay Web Merchant Registration API, along with their merchant IDs, to register and unregister their merchants’ websites for Apple Pay.

Sandbox Testing

The Apple Pay sandbox environment allows you test your implementation of Apple Pay with test credit and debit cards.

Читайте также:  Huawei phones мы iphone

Check the guidelines.

App Store Review Guidelines

Before submitting your app for review, make sure it follows these guidelines to help progress smoothly through the review process.

Apple pay on the Web Acceptable Use Guidelines

Before deploying Apple Pay on your website, make sure your implementation follows these guidelines.

Design guidelines

Learn how to optimize the design and checkout experience for Apple Pay.

Payment service providers

Support Apple Pay quickly and reliably with an SDK or API from a payment service provider (PSP).

View payment service providers

Contact us

Have a question or request? We can help by phone or email.

Источник

Подключаем оплату через Apple Pay на сайте

Сейчас, в том числе и у нас на сайте, и в приложениях ivi, есть явная тенденция роста аудитории на мобильных устройствах. Также растет и доля покупок, совершаемых в интернете с мобильных устройств. В отличие от десктопа, помимо традиционных вариантов оплаты, доступны системы мобильных платежей, например Apple Pay, Android Pay, Samsung Pay. Эти системы можно использовать не только для оплаты в терминалах, принимающих банковские карты, но и для оплаты в приложениях и на веб-сайтах.

Внедрение мобильных платежей мы начали с веб-версии ivi и выбрали мобильный сайт и систему Apple Pay.

Apple Pay — система мобильных платежей от Apple, позволяющая мобильным устройствам проводить платежи в магазинах и в интернете. Пользователь привязывает карту к телефону, и далее при оплате требуется только подтверждение платежа отпечатком пальца или цифровым кодом.

В этой статье я расскажу об использовании библиотеки Apple Pay JS.

Библиотека предназначена для использования Apple Pay на сайтах. Apple Pay JS API поддерживается на:

  • iOS начиная от 10 версии в браузере Safari и моделях iPhone, поддерживающих бесконтактные платежи (SE и старше 6);
  • macOS от версии 10.12 в браузере Safari на компьютерах с Touch ID или при подключенном iPhone или Apple Watch для подтверждения платежей.

Для того чтобы принимать платежи через Apple Pay на сайте, вам потребуется:

  • Девелоперский аккаунт Apple;
  • HTTPS на странице, использующей Apple Pay;
  • Выбрать платежный шлюз, с которым вы будете работать. Мы пользуемся услугами Payture.

Далее нужно зарегистрировать Merchant ID, создать сертификаты Merchant Identity Certificate и Payment Processing Certificate и верифицировать домены, на которых будет использоваться Apple Pay. Описание процесса есть в инструкции от Payture.

  • Merchant ID — идентификатор продавца, представляющий его в Apple Pay;
  • Payment Processing Certificate — сертификат, используемый для передачи платежных данных на стороне платежного шлюза. Сервера Apple Pay используют публичный ключ этого сертификата для шифрования платежных данных. Приватный ключ используется для расшифровывания данных при проведении платежа;
  • Merchant Identity Certificate — TLS сертификат, используемый для подтверждения данных продавца и авторизации платежных сессий через сервера Apple. Платежная сессия создается при инициализации процесса оплаты. Сертификат используется только на стороне сайта.

Стоит обратить внимание на то, что при верификации нужно указать полное доменное имя, т.е. маску домена указать не получится.

После всей подготовительной работы можно приступить к интеграции Apple Pay на сайт. Процесс интеграции состоит из 3 основных частей:

  • Создание платежной сессии, показ диалога платежа и обработка событий платежной сессии. Тут используется Apple Pay JS API;
  • Верификация платежной сессии. Требуется для того, чтобы система Apple Pay могла убедиться, что запрос идет от зарегистрированного продавца. Реализуется на бекенде;
  • Проведение платежа через платежный шлюз и завершение платежной сессии.

Создание платежной сессии

Перед показом кнопки оплаты через Apple Pay нужно проверить доступен ли Apple Pay на устройстве. Реализуется это так:

Далее с помощью Apple Pay JS API можно проверить есть ли у пользователя активные карты, привязанные к Apple Pay. Предоставляется 2 метода canMakePayments и canMakePaymentsWithActiveCard . Первый проверяет только факт поддержки Apple Pay, второй помимо этого позволяет узнать есть ли по крайней мере 1 карта, привязанная к Apple Pay.

У нас, например, эти проверки используются для того, чтобы решить показать кнопку оплаты через Apple Pay над остальными способами оплаты или под ними. В случае если добавленных карт нет, выводится кнопка Set Up Apple Pay, по клику открываются настройки телефона с разделом Wallet. В итоге пользователь уходит с сайта, а процесс оплаты прерывать не стоит, поэтому кнопка располагается под основными типами оплаты и даже не видна без скролла экрана.

Читайте также:  Apple ios 15 реклама

Страницы оплаты для настроенного и ненастроенного Apple Pay:

Как только кнопка отображена на странице, можно создать платежную сессию для того чтобы отобразить диалог оплаты. Сессия может быть создана только по явному пользовательскому действию. По клику на кнопку нужно выполнить следующий код:

В примере приведен минимальный набор свойств у объекта ApplePayPaymentRequest. Для отображения более подробной информации о покупке нужно использовать другие свойства этого объекта.

Для обработки событий платежной сессии нужно реализовать как минимум следующие методы:

  • onvalidatemerchant срабатывает при открытии платежной формы Apple Pay. В обработчике этого события требуется верифицировать платежную сессию. Процесс верификации описан далее;
  • onpaymentauthorized срабатывает когда пользователь подтверждает платеж на платежной форме Apple Pay с помощью Touch ID, Face ID или кода. Здесь доступен платежный токен, который нужно передать в платежный шлюз для проведения платежа;

После создания объекта ApplePaySession нужно вызвать метод begin для отображения диалога оплаты:

В результате пользователь увидит следующее:

При показе формы срабатывает событие onvalidatemerchant . Для того чтобы продолжить платеж реализуем следующий этап.

Верификация платежной сессии

В параметре события onvalidatemerchant приходит поле validationURL . На этот адрес с бекенда нужно отправить данные, подписанные сертификатом Merchant Identity Certificate.

Метод performValidation возвращает промис от запроса на валидацию. Обработчик этого запроса находится на нашей стороне, реализация такая: на URL из параметра события onvalidatemerchant отправляется post запрос.

В теле запроса содержится json:

Параметры MERCHANT_IDENTIFIER и DISPLAY_NAME берутся из девелоперского аккаунта (их настроили в самом начале), а HOST — это домен, с которого делается оплата.

Запрос должен быть подписан сертификатом Merchant Identity Certificate. В ответе придет json, его и нужно вернуть. После получения этого ответа, вызываем у платежной сессии метод completeMerchantValidation .

Процесс верификации сессии пройден, теперь пользователю требуется подтвердить платеж пальцем или кодом. После этого срабатывает событие onpaymentauthorized . Переходим к этапу проведения платежа.

Проведение платежа

В параметре события onpaymentauthorized содержится объект с платежным токеном, который нужно передать в платежный шлюз. Вся информация, содержащаяся в токене, описана в документации.

Как только платеж проведен, завершаем оплату на стороне клиента.

в success нужно передать один из 2 статусов window.ApplePaySession.STATUS_SUCCESS или window.ApplePaySession.STATUS_FAILURE .

На этом процесс оплаты через Apple Pay заканчивается. Более подробно про Apple Pay JS можно почитать в официальной документации.

Источник

Apple Pay for Donations

Apple Pay provides nonprofit organizations a simple and secure way to accept donations from within their app and website. Similar to using Apple Pay to buy goods and services, users can donate without entering their billing, shipping, or contact details. Apple doesn’t charge fees or commission on Apple Pay transactions.

Getting Started

To accept donations with Apple Pay, your organization will need the following:

  • Payment provider
  • Apple Developer Program membership
  • Approval to accept donations with Apple Pay
  • Apple Pay implemented in your app or website

Setup

Implementing Apple Pay to accept donations is similar to implementing Apple Pay to sell goods and services within your app or website. The account configuration, implementation process, and review guidelines are the same. The only additional steps are to get your nonprofit organization approved to accept donations with Apple Pay and to use the «Donate with Apple Pay» button.

Submitting for Approval

To register your nonprofit organization for Apple Pay, visit Benevity.org. You’ll be asked to provide basic information about your organization as well as your Apple Developer Team ID, which you can find in the Membership section of your developer account. Once approved, you’ll be notified by Apple and you’ll be able to submit your app to the App Store for review or publish your website.

Читайте также:  Apple id что если не написано нет

Resources and Help

For information on implementing Apple Pay and a list of payment providers, see our Apple Pay guides and reference.

If you have questions about implementing Apple Pay, please contact us.

Design guidelines

Learn how to optimize the design and checkout experience for Apple Pay.

Payment service providers

Support Apple Pay quickly and reliably with an SDK or API from a payment service provider (PSP).

View payment service providers

Contact us

Have a question or request? We can help by phone or email.

Источник

Девелоперский аккаунт apple для apple pay

Developer

Apple Pay Programming Guide

About Apple Pay

Apple Pay is a mobile payment technology that provides an easy and secure way for users to pay for real-world goods and services in your iOS apps, watchOS apps, and websites on Safari. This programming guide discusses Apple Pay in iOS apps.

For Apple Pay on the web, see Apple Pay JS.

For digital goods and services delivered within the app, see In-App Purchase Programming Guide.

Working with Apple Pay

Apps that use Apple Pay need to enable the Apple Pay capabilities in Xcode. You also register a merchant ID and create a Payment Processing certificate, which is a cryptographic key that is used to securely send payment data to your server.

To initiate a payment, your app creates a payment request. This request includes the subtotal for the services and goods purchased, as well as any additional charges for tax, shipping, or discounts. Pass this request to a payment authorization view controller, which displays the request to the user and prompts for any needed information, such as a shipping or billing address. Your delegate is called to update the request as the user interacts with the view controller.

As soon as the user authorizes the payment, Apple Pay encrypts payment information to prevent an unauthorized third party from accessing it. On the device, Apple Pay sends the payment request to the Secure Element, which is a dedicated chip on the user’s device. The Secure Element adds the payment data for the specified card and merchant, creating an encrypted payment token. It then passes this token to Apple’s servers, where it is reencrypted using your Payment Processing certificate. Finally, the servers pass the token back to your app for processing.

The payment token is never accessed or stored on Apple’s servers. The servers simply reencrypt the token using your certificate. This process lets your app securely encrypt the payment information without it having to distribute your Payment Processing certificate as part of the app.

For more information about Apple Pay’s security, see iOS Security Guide.

In most cases, your app passes the encrypted payment token to a third-party payment solution provider to decrypt and process the payment. However, if your team has an existing payment infrastructure, you can decrypt and process the payment on your own server.

For information about payment solution providers that support Apple Pay, see Apple Pay — Apple Developer.

Testing Apple Pay Transactions

Use the Apple Pay Sandbox environment to test your transactions with test payment cards.

In App Store Connect, create a test account. This account works for both App Store and Apple Pay testing.

On a valid test device, log into iCloud using the test account.

In the Wallet app, add a new card using manual entry.

Logging in and out of your iCloud account removes your cards. Test cards can only be used in the Sandbox environment. Additionally, the Sandbox environment tests only the connection between your app and the test card network. It does not test the connection between your app and your payment solution provider.

Источник

Оцените статью