private void SavePaymentMethod()
        {
            try
            {
                //
                int result = StorehouseHelper.SetPluginProperties(SupportedPlugin.TO_CHECKOUT, ctlPluginProps.Properties);
                //
                if (result < 0)
                {
                    ShowResultMessage(result);
                    //
                    return;
                }

                // update payment method
                result = StorehouseHelper.SetPaymentMethod(PaymentMethod.TCO,
                                                           txtDisplayName.Text.Trim(), SupportedPlugin.TO_CHECKOUT);
                //
                if (result < 0)
                {
                    ShowResultMessage(result);
                    //
                    return;
                }
                //
                RedirectToBrowsePage();
            }
            catch (Exception ex)
            {
                ShowErrorMessage("SAVE_PAYMENT_METHOD", ex);
            }
        }
示例#2
0
 private void SavePaymentMethod()
 {
     try
     {
         // update provider settings
         IPluginProperties ctlSettings = (IPluginProperties)FindControl(CTL_CC_PROVIDER);
         //
         int result = StorehouseHelper.SetPluginProperties(ExtractProvId(ddlAcceptPlugins.SelectedValue),
                                                           ctlSettings.Properties);
         //
         if (result < 0)
         {
             ShowResultMessage(result);
             //
             return;
         }
         // update payment method
         result = StorehouseHelper.SetPaymentMethod(PaymentMethod.CREDIT_CARD,
                                                    txtDisplayName.Text.Trim(), ExtractProvId(ddlAcceptPlugins.SelectedValue));
         //
         if (result < 0)
         {
             ShowResultMessage(result);
             //
             return;
         }
         //
         RedirectToBrowsePage();
     }
     catch (Exception ex)
     {
         ShowErrorMessage("SAVE_PAYMENT_METHOD", ex);
     }
 }