コード例 #1
0
        public void GetHtmlTest()
        {
            IOptions options = new VisaUpdateImageOptions("shared_Key", "abc123", EventTypes.Confirm, "apiKey", 21M, 22M, CurrencyCodes.USD);

            string result = options.GetOptionString();

            Assert.IsNotNull(result);
            Assert.IsTrue(result.Contains(VisaUpdateImageOptions.SandboxUrl));
            Assert.IsTrue(result.Contains("eventType=Confirm"));
            Assert.IsTrue(result.Contains("apikey=apiKey"));
            Assert.IsTrue(result.Contains("subtotal=21.00"));
            Assert.IsTrue(result.Contains("total=22.00"));
            Assert.IsTrue(result.Contains("currencyCode=USD"));
        }
コード例 #2
0
 /// <summary>
 /// Write the Visa Checkout update image
 /// </summary>
 /// <param name="helper">The <see cref="HtmlHelper"/></param>
 /// <param name="options">The options for the Visa Checkout update image <see cref="VisaUpdateImageOptions"/></param>
 /// <returns></returns>
 public static MvcHtmlString WriteVisaUpdateImage(this HtmlHelper helper, VisaUpdateImageOptions options)
 {
     return(new MvcHtmlString(options.GetOptionString()));
 }