Contents

onvalidatemerchant

An event handler the system calls when it displays the payment sheet.

Declaration

attribute EventHandler onvalidatemerchant;

Mentioned in

Discussion

Use this attribute to request and return a merchant session. You must set this attribute to the following function:

session.onvalidatemerchant = function(event) {}

where event is an ApplePayValidateMerchantEvent object.

The process to complete the merchant validation is as follows:

  1. Your onvalidatemerchant function calls your server, and passes it the static hostname apple-pay-gateway.apple.com as the validation URL. In the China region, use cn-apple-pay-gateway.apple.com.

  2. Your server uses the validation URL to request a session from the Apple Pay server, as described in Requesting an Apple Pay payment session.

  3. In response, your server receives an opaque merchant session object, MerchantSession.

  4. You pass the merchant session object to the completion method, completeMerchantValidation.

The system enables the payment sheet.

See Also

Related Documentation

Getting merchant validation