예제 #1
0
    /// <summary>
    /// Handles the Click event of the UnarchiveButton 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.UnarchiveOrderRequest archiveReq = new GCheckout.OrderProcessing.UnarchiveOrderRequest(orderNumberLbl.Text);
        archiveReq.Send();
        Orders.Orders.UnarchiveOrder(orderNumberLbl.Text);
        orderDetailsPanel.Visible = false;
        Response.Redirect(Request.RawUrl);
    }
        public void UnarchiveOrderRequestTests()
        {
            UnarchiveOrderRequest req = new UnarchiveOrderRequest(ORDER_NUMBER);
              AutoGen.UnarchiveOrderRequest post = EncodeHelper.Deserialize(req.GetXml()) as AutoGen.UnarchiveOrderRequest;

              Assert.AreEqual(req.GoogleOrderNumber, post.googleordernumber);

              req = new UnarchiveOrderRequest(MERCHANT_ID, MERCHANT_KEY, "Sandbox", ORDER_NUMBER);
              post = EncodeHelper.Deserialize(req.GetXml()) as AutoGen.UnarchiveOrderRequest;
        }