// ---------------------------------------------------------------------------------- private void Paddle_RecoveryErrorEvent(object sender, LicensingRecoveryErrorEventArgs e) { debug_print(e.ToString()); CJsonResult jResult = new CJsonResult { errCodeI = PADErrorUnableToRecoverLicense, errStr = e.Message }; ScTask.get().set_result(CreateJsonResult(jResult)); }
private void Paddle_RecoveryCompleteEvent(object sender, LicensingRecoveryCompleteEventArgs e) { debug_print(e.ToString()); debug_print(e.Message); CJsonResult jResult = new CJsonResult { successB = true, resultI = 1 }; ScTask.get().set_result(CreateJsonResult(jResult)); }
private void Paddle_CheckoutWindowClosed() { ScTask task = ScTask.get(); // task may be NULL at this point // if the checkout already completed or errored if (task != null) { CJsonResult jResult = new CJsonResult { resultI = Convert.ToInt32(CheckoutState.Abandoned) }; task.set_result(CreateJsonResult(jResult)); } }
private void Paddle_LicensingCompleteEvent(object sender, LicensingCompleteEventArgs e) { ScTask task = ScTask.get(); debug_print(e.ToString()); // may be NULL during auto-activate if (task != null) { CJsonResult jResult = new CJsonResult { successB = true, resultI = Convert.ToInt32(ActivationState.Activated) }; task.set_result(CreateJsonResult(jResult)); } }
private void Paddle_LicensingErrorEvent(object sender, LicensingErrorEventArgs e) { ScTask task = ScTask.get(); debug_print(e.ToString()); // may be NULL during auto-activate if (task != null) { CJsonResult jResult = new CJsonResult { resultI = Convert.ToInt32(ActivationState.Failed), errCodeI = PADErrorLicenseActivationFailed, errStr = "Licensing failed" }; task.set_result(CreateJsonResult(jResult)); } }
private void Paddle_CheckoutErrorEvent(object sender, TransactionErrorEventArgs e) { ScTask task = ScTask.get(); debug_print(e.ToString()); // task may be NULL at this point // if the checkout already completed if (task != null) { CJsonResult jResult = new CJsonResult { resultI = Convert.ToInt32(CheckoutState.Failed), // ?? errCodeI = PADErrorLicenseActivationFailed, errStr = e.Error }; task.set_result(CreateJsonResult(jResult)); } }
private void Paddle_CheckoutCompleteEvent(object sender, TransactionCompleteEventArgs e) { ScTask task = ScTask.get(); debug_print(e.ToString()); Debug.Assert(task != null, "ScTask should not be NULL"); if (task != null) { string purchResponseJsonStr = JsonConvert.SerializeObject(e.ProcessStatus, Formatting.Indented); CJsonResult jResult = new CJsonResult { successB = true, resultI = Convert.ToInt32(CheckoutState.Purchased), responseJson = purchResponseJsonStr }; task.set_result(CreateJsonResult(jResult)); } }