paypal / paypal-here-sdk-ios-distribution

Add credit card (tap, insert, swipe & key-in) capabilities to your iOS app
Other
81 stars 91 forks source link

Chip & PIN errors #341

Open christhwaites opened 3 years ago

christhwaites commented 3 years ago

I'm getting an error whenever I try a chip & PIN payment. It's highly reproducible over all my test readers and cards.

Here's what I think is the relevant part of the log:

2020-07-29 13:47:31.049609+0100 FerryApp[1233:337256] ERROR: [paymentDevice.miura.cardMetadataParser] Unable to parse card metadata: TypeError: undefined is not an object (evaluating 'responsePacket.apdu.data.toString') from : <----
Card reader response: SW1: 0x9f SW2: 0xff
---->
2020-07-29 13:47:31.069408+0100 FerryApp[1233:337256] WARN: [paymentDevice.miura] Contact tx Response from device was not handled <----
Card reader response: SW1: 0x9f SW2: 0xff
---->
2020-07-29 13:47:31.085258+0100 FerryApp[1233:337256] ERROR: [tx.cardPresentedHandler] TxFailed {
  "domain": "PaymentDevice",
  "code": "15",
  "err": "{\"code\":\"15\",\"domain\":\"PaymentDevice\",\"line\":79203,\"column\":38,\"sourceURL\":\"manticore://root\"}"
}

I don't know where to start with debugging this, since it all seems to happen internally in the device after inserting the card, but before anything comes back to my controller...

Any help at all (or pointers) will be very gratefully received!

Cheers, Chris

ps - for completeness, Here's the full output log of the transaction:

2020-07-29 13:47:25.345768+0100 FerryApp[1233:337256] INFO: [transactionContext] ActivatedCRForInvoice {
  "id": "tx-2315712983716",
  "crId": "PayPal 828",
  "currency": "GBP",
  "total": "1",
  "ff": "Chip,EmvCertifiedContactless,MagneticCardSwipe,SecureManualEntry"
}
2020-07-29 13:47:29.128138+0100 FerryApp[1233:337256] INFO: [transactionContext] errHandlerResponse {
  "id": "tx-2315712983716",
  "domain": "PaymentDevice",
  "code": "13",
  "ff": "EmvCertifiedContactless",
  "err": null
}
2020-07-29 13:47:29.242370+0100 FerryApp[1233:337256] TRACK: [tx.cardPresentedHandler] ReceivedCardPresentEvent {
  "subType": "insertDetected",
  "ff": "Chip",
  "context": {
    "id": "tx-2315712983716",
    "type": 0,
    "currency": "GBP",
    "total": "1",
    "state": {
      "paymentState": "inProgress",
      "tippingState": "notStarted",
      "endState": "notInvoked",
      "connectedDevices": 1,
      "selectedDevice": "PayPal 828",
      "activeFormFactors": "Chip,EmvCertifiedContactless,MagneticCardSwipe,SecureManualEntry"
    }
  }
}
2020-07-29 13:47:29.281130+0100 FerryApp[1233:337256] TRACK: [tx.cardPresentedHandler] ReceivedCardPresentEvent {
  "subType": "insertDetected",
  "ff": "Chip",
  "context": {
    "id": "tx-2315712983716",
    "type": 0,
    "currency": "GBP",
    "total": "1",
    "state": {
      "paymentState": "inProgress",
      "tippingState": "notStarted",
      "endState": "notInvoked",
      "connectedDevices": 1,
      "selectedDevice": "PayPal 828",
      "activeFormFactors": "Chip,EmvCertifiedContactless,MagneticCardSwipe,SecureManualEntry"
    }
  }
}
2020-07-29 13:47:31.049609+0100 FerryApp[1233:337256] ERROR: [paymentDevice.miura.cardMetadataParser] Unable to parse card metadata: TypeError: undefined is not an object (evaluating 'responsePacket.apdu.data.toString') from : <----
Card reader response: SW1: 0x9f SW2: 0xff
---->
2020-07-29 13:47:31.069408+0100 FerryApp[1233:337256] WARN: [paymentDevice.miura] Contact tx Response from device was not handled <----
Card reader response: SW1: 0x9f SW2: 0xff
---->
2020-07-29 13:47:31.085258+0100 FerryApp[1233:337256] ERROR: [tx.cardPresentedHandler] TxFailed {
  "domain": "PaymentDevice",
  "code": "15",
  "err": "{\"code\":\"15\",\"domain\":\"PaymentDevice\",\"line\":79203,\"column\":38,\"sourceURL\":\"manticore://root\"}"
}
2020-07-29 13:47:31.415184+0100 FerryApp[1233:337256] TRACK: [tx.cardPresentedHandler] SubtypeEventAfterListenersRemoved {
  "subType": "pinEvent",
  "ff": "Chip",
  "context": {
    "id": "tx-2315712983716",
    "type": 0,
    "currency": "GBP",
    "total": "1",
    "state": {
      "paymentState": "inProgress",
      "tippingState": "notStarted",
      "endState": "notInvoked",
      "connectedDevices": 1,
      "selectedDevice": "PayPal 828",
      "activeFormFactors": "Chip,EmvCertifiedContactless,MagneticCardSwipe,SecureManualEntry"
    }
  },
  "lastEvent": "{\"code\":\"15\",\"domain\":\"PaymentDevice\",\"line\":79203,\"column\":38,\"sourceURL\":\"manticore://root\"}",
  "deviceModel": 3
}
2020-07-29 13:47:31.548812+0100 FerryApp[1233:337256] ERROR: [paymentDevice.miura.cardMetadataParser] Unable to parse card metadata: TypeError: undefined is not an object (evaluating 'responsePacket.apdu.data.toString') from : <----
Card reader response: SW1: 0x9f SW2: 0xff
---->
2020-07-29 13:47:31.572631+0100 FerryApp[1233:337256] WARN: [paymentDevice.miura] Contact tx Response from device was not handled <----
Card reader response: SW1: 0x9f SW2: 0xff
---->
2020-07-29 13:47:31.599121+0100 FerryApp[1233:337256] TRACK: [tx.cardPresentedHandler] ErrorEventAfterListenersRemoved {
  "err": "{\"code\":\"15\",\"domain\":\"PaymentDevice\",\"line\":79203,\"column\":38,\"sourceURL\":\"manticore://root\"}",
  "ff": "Chip",
  "context": {
    "id": "tx-2315712983716",
    "type": 0,
    "currency": "GBP",
    "total": "1",
    "state": {
      "paymentState": "inProgress",
      "tippingState": "notStarted",
      "endState": "notInvoked",
      "connectedDevices": 1,
      "selectedDevice": "PayPal 828",
      "activeFormFactors": "Chip,EmvCertifiedContactless,MagneticCardSwipe,SecureManualEntry"
    }
  },
  "lastEvent": "{\"code\":\"15\",\"domain\":\"PaymentDevice\",\"line\":79203,\"column\":38,\"sourceURL\":\"manticore://root\"}",
  "deviceModel": 3
}
2020-07-29 13:47:41.893487+0100 FerryApp[1233:337256] TRACK: [tx.cardPresentedHandler] SubtypeEventAfterListenersRemoved {
  "subType": "pinEvent",
  "ff": "Chip",
  "context": {
    "id": "tx-2315712983716",
    "type": 0,
    "currency": "GBP",
    "total": "1",
    "state": {
      "paymentState": "inProgress",
      "tippingState": "notStarted",
      "endState": "notInvoked",
      "connectedDevices": 1,
      "selectedDevice": "PayPal 828",
      "activeFormFactors": "Chip,EmvCertifiedContactless,MagneticCardSwipe,SecureManualEntry"
    }
  },
  "lastEvent": "{\"code\":\"15\",\"domain\":\"PaymentDevice\",\"line\":79203,\"column\":38,\"sourceURL\":\"manticore://root\"}",
  "deviceModel": 3
}
2020-07-29 13:47:41.936256+0100 FerryApp[1233:337256] TRACK: [tx.cardPresentedHandler] SubtypeEventAfterListenersRemoved {
  "subType": "pinEvent",
  "ff": "Chip",
  "context": {
    "id": "tx-2315712983716",
    "type": 0,
    "currency": "GBP",
    "total": "1",
    "state": {
      "paymentState": "inProgress",
      "tippingState": "notStarted",
      "endState": "notInvoked",
      "connectedDevices": 1,
      "selectedDevice": "PayPal 828",
      "activeFormFactors": "Chip,EmvCertifiedContactless,MagneticCardSwipe,SecureManualEntry"
    }
  },
  "lastEvent": "{\"code\":\"15\",\"domain\":\"PaymentDevice\",\"line\":79203,\"column\":38,\"sourceURL\":\"manticore://root\"}",
  "deviceModel": 3
}