Apple pay with stripe invalid shipping address

790 views Asked by At

User authorises the payment via delegate method:

- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
                       didAuthorizePayment:(PKPayment *)payment
{
    //my code here
}

The payment is then used in following method to make token:

    [Stripe createTokenWithPayment:payment
                    completion:^(STPToken *token, NSError *error) 

It is not making any token rather showing the user this error;

PKPaymentAuthorizationStatusInvalidShippingContact

I want to know if this is mine error or just user is not providing sufficient information.

1

There are 1 answers

0
The Windwaker On

You are using the wrong delegate method to handle payment validation. The corect one is

- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller
                   didAuthorizePayment:(PKPayment *)payment
                            completion:(void (^)(PKPaymentAuthorizationStatus status))completion;