Skip to content

Merchant validation fails in Local PC and ngrok #68

Closed
@sampathbillava

Description

@sampathbillava

Expected behaviour

Must get a token from apple pay (Which has to be decrypted for payment)

Actual behaviour

I get the following error (in Local)
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.ComponentModel.Win32Exception: The credentials supplied to the package were not recognized

Error comes on the following line:
merchantSession = await _ApplePayServieBusiness.GetMerchantSessionAsync(requestUri, request, cancellationToken);

request URi -> https://apple-pay-gateway-cert.apple.com/paymentservices/startSession
DisplayName -> "Store Name"
Initiative -> "web"
InitiativeContext -> tried local host and also hard coded the domain "www.services.something.ae"
MerchantIdentifier -> F**************************************************************D
PFX file is present in the project root and apple-developer-merchantid-domain-association is present in .wellKnow folder

Steps to reproduce

I have tested in 2 different ways:

  1. Debugged in local PC. I got an apple pay button(due to polyfill). On click of the button i get the above mentioned error. (Maybe because of local host?)
  2. I have used ngrok to host the application. Accessed the URL from an iPhone. I am getting the button. On click of the button, the sheet is displayed but it just show processing and fails.
    iPhone screenshot

Please not the I tried with Sand-Box test account. I get error like this "this website does not accept Visa".

Any help on why i am getting these issues or a suggestion on how apple pay has to be tested would be great.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions