Apple Pay with WorldPay integration – extracting payload

Published

On Xamarin Forms, I am trying to send an Apple Pay payload to WorldPay (payment gateway). It has a guide on what the request should look like, and here is a short snippet:

<APPLEPAY-SSL>
    <header>
      <ephemeralPublicKey>AAAA...</ephemeralPublicKey>
      <publicKeyHash>AAAA...</publicKeyHash>
      <transactionId>AAAA...</transactionId>
    </header>
    <signature>AAAA...</signature>
    <version>EC_v1</version>
    <data>AAAA...</data>
  </APPLEPAY-SSL>

I need to extract this mandatory data from the PKPayment object that I get in the below override

public override void DidAuthorizePayment(PKPaymentAuthorizationViewController controller, PKPayment payment, Action<PKPaymentAuthorizationStatus> completion)
    {
        completion(obj: PKPaymentAuthorizationStatus.Success);
    }

The only examples I found on how to handle this object, are to use a 3rd party SDK (stripe) which extracts just the ID and Token, and not all that I need.

My current code is identical to the question here.

Please let me know how can I get the data world pay requires using apple pay in Xamarin.Forms.

Source: Xamarin.ios Questions

Published
Categorised as Uncategorised Tagged , , , ,

Answers

Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq