Skip to content

Apple Pay JS #1

Description

@sairaut

Hi Cheng,

I am using Apple pay JS to integrate Apple pay on my website and NOT app. I have managed to get the merchant validated and on session.onpaymentauthorized event i am receiving the payment token

`session.onpaymentauthorized = function (event) {

            // Get the payment data for use to capture funds from
            // the encrypted Apple Pay token in your server.
            var token = event.payment.token.paymentData;`

Can you please explain how i can decrypt the token using your code? I see that you have test method as below:

`public void InitCompatibleTest()
        {
            var decrypter = new ApplePayTokenDecrypter();
            var p = new ApplePayParameters
            {
                //EphemeralPublicKey = "dGVzdA==",
                EphemeralPublicKey = "",
                PrivateKey = "dGVzdA=="
            };
            decrypter.Init(p);

            Assert.AreSame(p, decrypter.PaymentParameters);
        }`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions