Closed asperon closed 7 years ago
Yes this is correct. If the payment was not successful you will receive and error instead. You should not do any logic based on that content of an error. It is only for debugging purposes. From the docs:
iZettle will display any errors that occur during an operation to the user, the NSError-object returned in the operation completion block is only intended to be used by developers for debugging, diagnostics and logging to be able to better communicate errors to iZettle. You should never present the returned errors to the end user.
Ok, so there is no way for me to tell why the transaction failed?
Depends who "me" is. The end user will be informed by our UI, you as developer will get debugging info from the content of the NSError that you can use for logging etc. But the UI has already informed the user using our UI, so no more action should be to be taken from you end. Could you explain what you want to do?
I, as the developer, just want to log the reason that the transaction was denied.
Hej,
finns det något api eller liknande för att få ut rapporter från er som vi kan läsa in i vårt ekonomisystem?
Carl
On 2016-06-10 08:34, Måns Bernhardt wrote:
Depends who "me" is. The end user will be informed by our UI, you as developer will get debugging info from the content of the NSError that you can use for logging etc. But the UI has already informed the user using our UI, so no more action should be to be taken from you end. Could you explain what you want to do?
You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [1], or mute the thread [2].
*
Links:
[1] https://github.com/iZettle/sdk-ios/issues/71#issuecomment-225104516 [2] https://github.com/notifications/unsubscribe/AAV4UKvw0IZ2MK_Qi6g0iFZgYpZq_ZQnks5qKQWJgaJpZM4Iypv6
Hej,
Det finns inget publikt API för att få ut rapporter i dagsläget men en användare kan exportera rapporter genom att logga in på my.izettle.com.
Vi arbetar för närvarande med att göra information i iZettles system mer lättillgänglig och lättanvänd för kunder och utvecklare. Vi kommer att gå ut med mer information vid senare tillfälle.
Vänliga hälsningar Joakim
Any update on this, logging rejected transactions with a reason for the rejection is really important for audit purposes, having this available in the SDK would be very beneficial.
And by logging I also mean present this to the staff so they can see the reason for the rejection.
Am I correct in that if NSError = nil; the transaction is ok? and if NOT nil some sort of error occurred?
Yes the completion callback is called with either an iZettleSDKPaymentInfo or an NSError. If an error is passed something went wrong, and if an iZettleSDKPaymentInfo is passed the transition was ok.
Am i correct in assuming that if i get a iZettlePaymentInfo returned then the transaction was successful? Is there any way to determine what went wrong if it isn't returned (Declined, Cancel, Expired etc etc)?