private void button1_Click(object sender, EventArgs e) { JObject jsonObject = new JObject { { CPaddleWrapper.kPaddleCmdKey_SKU, PAD_PRODUCT_ID } }; string resultStr, jsonStr = jsonObject.ToString(); Cursor.Current = Cursors.WaitCursor; resultStr = i_paddleRef.DoCommand(CommandType.Command_VALIDATE, jsonStr); Cursor.Current = Cursors.Arrow; CPaddleWrapper.debug_print(resultStr); MessageBox.Show("Validate returned a result!"); }
private void button2_Click(object sender, EventArgs e) { JObject jsonObject = new JObject { { CPaddleWrapper.kPaddleCmdKey_SKU, PAD_PRODUCT_ID }, { CPaddleWrapper.kPaddleCmdKey_EMAIL, "*****@*****.**" }, { CPaddleWrapper.kPaddleCmdKey_COUPON, "fake-coupon" }, { CPaddleWrapper.kPaddleCmdKey_COUNTRY, "US" }, { CPaddleWrapper.kPaddleCmdKey_POSTCODE, "94602" }, // un comment these to override what's shown //{ CPaddleWrapper.kPaddleCmdKey_TITLE, "Catnip" }, //{ CPaddleWrapper.kPaddleCmdKey_MESSAGE, "For fluffy cats" }, }; string resultStr, jsonStr = jsonObject.ToString(); Cursor.Current = Cursors.WaitCursor; resultStr = i_paddleRef.DoCommand(CommandType.Command_PURCHASE, jsonStr); Cursor.Current = Cursors.Arrow; CPaddleWrapper.debug_print(resultStr); MessageBox.Show("Purchase returned a result!"); }