public void ArchiveOrderRequestTests()
        {
            ArchiveOrderRequest req = new ArchiveOrderRequest(ORDER_NUMBER);
              ArchiveOrderRequest req2
            = EncodeHelper.Deserialize(req.GetXml()) as ArchiveOrderRequest;

              Assert.AreEqual(ORDER_NUMBER, req.GoogleOrderNumber);

              req = new ArchiveOrderRequest(MERCHANT_ID, MERCHANT_KEY, "Sandbox", ORDER_NUMBER);
              Assert.AreEqual(ORDER_NUMBER, req.GoogleOrderNumber);
        }
コード例 #2
0
    /// <summary>
    /// Handles the Click event of the ArchiveButton control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void ArchiveButton_Click(object sender, EventArgs e)
    {
        Panel orderDetailsPanel = (Panel)LoginView.FindControl("OrderDetailsPanel");
        Label orderNumberLbl    = (Label)LoginView.FindControl("GoogleOrderNumberLabel");

        GCheckout.OrderProcessing.ArchiveOrderRequest archiveReq = new GCheckout.OrderProcessing.ArchiveOrderRequest(orderNumberLbl.Text);
        archiveReq.Send();
        Orders.Orders.ArchiveOrder(orderNumberLbl.Text);
        orderDetailsPanel.Visible = false;
        Response.Redirect(Request.RawUrl);
    }