Not able to add pass to wallet

Hi,

I am trying to develop "Add to Apple Pay" feature in our mobile app and been following "Getting Started with Apple Pay In-App Provisioning, Verification & Security 3.0" documentation provided. The issue is after getting encryptedPassData, activationData and ephemeralPublicKey back from our provider, constructing the PKAddPaymenetPassRequest with these values and passing it to the handler is failing. Below is the source code for reference.

---------***

    PKAddPaymentPassRequest *request = [[PKAddPaymentPassRequest alloc] init];
  
  NSString* encryptedPassData = args[@"encryptedPassData"];
  NSString* activationData =args[@"activationData"];
  NSString* ephemeralPublicKey = args[@"ephemeralPublicKey"];
  
  NSData* encryptedPassDataData = [[NSData alloc] initWithBase64EncodedString:encryptedPassData options:0];
  NSData* activationDataData = [[NSData alloc] initWithBase64EncodedString:activationData options:0];
  NSData* ephemeralPublicKeyData = [[NSData alloc] initWithBase64EncodedString:ephemeralPublicKey options:0];
  
  request.encryptedPassData = encryptedPassDataData;
  request.activationData = activationDataData;
  request.ephemeralPublicKey = ephemeralPublicKeyData;

  handler(request);
  • Take a look at this article: https://medium.com/@daviddvd19/inapp-provisioning-enrolling-cards-en-5c368591d320

Add a Comment

Replies

I want to know how the encryptedPassData produce? I mean the process of encrypt