ApplePay.JS - completeMerchantValidation closes Payment Sheet

Hi,


The ApplePay.JS Payment Sheet opens and immediately on the completeMerchantValidation closes and generates the 'cancel' event - what couldbe the reason?


The merchant session obtained appears valid - it looks like :


"{\"merchantSession\":\"{\\"epochTimestamp\\":1474348924261,\\"merchantSessionIdentifier\\":\\"3B3878F14D67466D831D8E2157F5E206_916523AAED1343F5BC5815E12BEE9250AFFDC1A17C46B0DE5A943F0F94927C24\\",\\"nonce\\":\\"b0a18557\\",\\"merchantIdentifier\\":\\"C2EDAB942991BC2CF2CD73E3CEF47871FC74CB9D039182AC2E964C69FC04607B\\",\\"domainName\\"...


The validation URL sent by Apple Pay 'session.onvalidatemerchant' is https://apple-pay-gateway-cert.apple.com/paymentservices/startSession


We are using iPad/iOS 10 and Xcode 8 Simulator and have provisioned test cards.


Any thoughts appreciated,


emil

Replies

Hi,


It became a situation like I was also similar.


I think, should be domainName in payload to window.location.host (javascript) at merchant validation.

(Not domain name associated with your Apple Pay Merchant Identity Certificate)

I went well in this.

Good luck.

Hi,


Above Method (window.location.host (javascript)), is only available at SandBox.

At real, need same between browser domain and registered domain name.


Sorry.

Hi Emil

in order to test your apple pay web js on your local machine. You can change the host file to match your domain name in url for localhost to one has been registered for your official site. For example I verified my official web site for example apple.com on my localhost I make my site domain to be apple.com and I was able to test apple pay.