partial void VerifyTransaction(NSObject sender) { // You MUST obtain the SKPaymentTransaction here // That you want to validate against Beeblex Service SKPaymentTransaction skTrans = new SKPaymentTransaction(); // Initialize your BBXIAPTransaction with the SKPaymentTransaction you got // If you do not provide a Valid SKPaymentTransaction you will get a // MonoTouch.Foundation.MonoTouchException // Because you need a transaction that is either purchased or restored. BBXIAPTransaction bbxTransaction = new BBXIAPTransaction(skTrans); // Here the you validate the SKPaymentTransaction. bbxTransaction.Validate((error) => { if (bbxTransaction.TransactionVerified) { if (bbxTransaction.TransactionIsDuplicate) { // The transaction is valid, but duplicate - it has already been // sent to Beeblex in the past. // Do Something Here } else { // The transaction has been successfully validated // and is unique. // Do Something Here } } else { // Check whether this is a validation error, or if something // went wrong with Beeblex. // Do Something Here if (bbxTransaction.HasServerError) { // The error was not caused by a problem with the data, but is // most likely due to some transient networking issues. // Do Something Here } else { // The transaction supplied to the validation service was not valid according to Apple. // Do Something Here } } }); }
partial void VerifyTransaction(NSObject sender) { // You MUST obtain the SKPaymentTransaction here // That you want to validate against Beeblex Service SKPaymentTransaction skTrans = new SKPaymentTransaction(); // Initialize your BBXIAPTransaction with the SKPaymentTransaction you got // If you do not provide a Valid SKPaymentTransaction you will get a // MonoTouch.Foundation.MonoTouchException // Because you need a transaction that is either purchased or restored. BBXIAPTransaction bbxTransaction = new BBXIAPTransaction(skTrans); // Here the you validate the SKPaymentTransaction. bbxTransaction.Validate((error)=> { if (bbxTransaction.TransactionVerified) { if (bbxTransaction.TransactionIsDuplicate) { // The transaction is valid, but duplicate - it has already been // sent to Beeblex in the past. // Do Something Here } else { // The transaction has been successfully validated // and is unique. // Do Something Here } } else { // Check whether this is a validation error, or if something // went wrong with Beeblex. // Do Something Here if (bbxTransaction.HasServerError) { // The error was not caused by a problem with the data, but is // most likely due to some transient networking issues. // Do Something Here } else { // The transaction supplied to the validation service was not valid according to Apple. // Do Something Here } } }); }