Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

158
Vistas
PKPaymentAuthorizationController is not presented sometimes

We ran into a problem that the PKPaymentAuthorizationController is not presented, although everything is done, as described in the examples. A PKPaymentRequest is created in the code, passed to the PKPaymentAuthorizationController initializer, after which the present method is called on this PKPaymentAuthorizationController as well. This behavior is reproduced steely the first time you try to show the controller in a freshly installed application. Also, the bug can be reproduced randomly during the subsequent use of the application; in this case, it is impossible to find any explicit way of reproducing. The issue is definitely not a typo in any of the values ​​required to create the PKPaymentRequest, I mean merchantIdentifier, supportedNetworks, merchantCapabilities, countryCode, currencyCode and paymentSummaryItems, we have already checked this more than once. The issue is also not about converting a Double price value into NSDecimalNumber, as was written in one of the answers to a similar question on Stack Overflow. We used the debugger, which showed that the PKPaymentRequest is successfully created, just like the PKPaymentAuthorizationController itself. But when the present method is called, nothing happens on the screen. We would be grateful if you could help us solve the issue. Here is a sample code:

        let request = PKPaymentRequest()
        request.merchantIdentifier = "HERE_IS_OUR_M_ID"
        request.supportedNetworks = [.amex, .visa, .masterCard]
        request.merchantCapabilities = .capability3DS
        request.countryCode = "US"
        request.currencyCode = "USD"
        request.paymentSummaryItems = [
            PKPaymentSummaryItem(label: "BUY_ITEM_TEXT", amount: NSDecimalNumber(value: buyItemPrice)),
            PKPaymentSummaryItem(label: "COMPANY_NAME", amount: NSDecimalNumber(value: buyItemPrice), type: .final)
        ]
        let applePayController = PKPaymentAuthorizationController(paymentRequest: request)
        applePayController.delegate = self
        applePayController.present(completion: nil)
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda