{"action":"created","issue":{"url":"https://api.github.com/repos/paypal/PayPal-Cordova-Plugin/issues/58","labels_url":"https://api.github.com/repos/paypal/PayPal-Cordova-Plugin/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/paypal/PayPal-Cordova-Plugin/issues/58/comments","events_url":"https://api.github.com/repos/paypal/PayPal-Cordova-Plugin/issues/58/events","html_url":"https://github.com/paypal/PayPal-Cordova-Plugin/issues/58","id":60825673,"number":58,"title":"iOS Crash when adding invoiceNumber","user":{"login":"cihadhoruzoglu","id":1528616,"avatar_url":"https://avatars.githubusercontent.com/u/1528616?v=3","gravatar_id":"","url":"https://api.github.com/users/cihadhoruzoglu","html_url":"https://github.com/cihadhoruzoglu","followers_url":"https://api.github.com/users/cihadhoruzoglu/followers","following_url":"https://api.github.com/users/cihadhoruzoglu/following{/other_user}","gists_url":"https://api.github.com/users/cihadhoruzoglu/gists{/gist_id}","starred_url":"https://api.github.com/users/cihadhoruzoglu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cihadhoruzoglu/subscriptions","organizations_url":"https://api.github.com/users/cihadhoruzoglu/orgs","repos_url":"https://api.github.com/users/cihadhoruzoglu/repos","events_url":"https://api.github.com/users/cihadhoruzoglu/events{/privacy}","received_events_url":"https://api.github.com/users/cihadhoruzoglu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-12T14:20:44Z","updated_at":"2015-03-12T15:49:58Z","closed_at":null,"body":"Hi,\r\n\r\nWhen we add invoiceNumber to the payment then iOS crashed.\r\n\r\nSample Code;\r\n```\r\nvar payment = new window.PayPalPayment(totalPrice, \"TRY\", $scope.order.Product.Name, \"Sale\", paymentDetails);\r\npayment.invoiceNumber($scope.order.orderId); // orderId is string\r\n```\r\n\r\n![screen shot 2015-03-12 at 16 16 29](https://cloud.githubusercontent.com/assets/1528616/6619489/34888c5c-c8d3-11e4-8706-a58937b07849.png)\r\n\r\n2015-03-12 16:14:40.157 CicekSepeti[800:147913] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber length]: unrecognized selector sent to instance 0xb000000000057f33'\r\n*** First throw call stack:\r\n(0x18330659c 0x193a5c0e4 0x18330d664 0x18330a418 0x18320eb6c 0x100213fa0 0x1000776a4 0x100dace30 0x100dacdf0 0x100db99a0 0x100dbaf18 0x19427d2e4 0x19427cfa8)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n(lldb) \r\n\r\nAndroid works well but iOS crashing. How can we fix that?\r\n\r\nPayPalMobile sdk version 3.1.3\r\nWe tested on iPhone 6, 6+ and 4S."},"comment":{"url":"https://api.github.com/repos/paypal/PayPal-Cordova-Plugin/issues/comments/78507729","html_url":"https://github.com/paypal/PayPal-Cordova-Plugin/issues/58#issuecomment-78507729","issue_url":"https://api.github.com/repos/paypal/PayPal-Cordova-Plugin/issues/58","id":78507729,"user":{"login":"romk1n","id":1556000,"avatar_url":"https://avatars.githubusercontent.com/u/1556000?v=3","gravatar_id":"","url":"https://api.github.com/users/romk1n","html_url":"https://github.com/romk1n","followers_url":"https://api.github.com/users/romk1n/followers","following_url":"https://api.github.com/users/romk1n/following{/other_user}","gists_url":"https://api.github.com/users/romk1n/gists{/gist_id}","starred_url":"https://api.github.com/users/romk1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romk1n/subscriptions","organizations_url":"https://api.github.com/users/romk1n/orgs","repos_url":"https://api.github.com/users/romk1n/repos","events_url":"https://api.github.com/users/romk1n/events{/privacy}","received_events_url":"https://api.github.com/users/romk1n/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T15:49:58Z","updated_at":"2015-03-12T15:49:58Z","body":"@cihadhoruzoglu can you try and see if you can reproduce the same issue if you force convert to string ?\r\n\r\n`payment.invoiceNumber(String($scope.order.orderId));`\r\n\r\nThe crash seems to happen when we check if the payment is processable and expects some property to be `NSString` but is getting `NSNumber`."}}