本文整理汇总了C#中Braintree.CreditCardRequest.ToXml方法的典型用法代码示例。如果您正苦于以下问题:C# CreditCardRequest.ToXml方法的具体用法?C# CreditCardRequest.ToXml怎么用?C# CreditCardRequest.ToXml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Braintree.CreditCardRequest
的用法示例。
在下文中一共展示了CreditCardRequest.ToXml方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToXml_Includes_DeviceData
public void ToXml_Includes_DeviceData()
{
CreditCardRequest request = new CreditCardRequest();
request.DeviceData = "{\"device_session_id\":\"my_dsid\", \"fraud_merchant_id\":\"my_fmid\"}";
Assert.IsTrue(request.ToXml().Contains("device-data"));
Assert.IsTrue(request.ToXml().Contains("device_session_id"));
Assert.IsTrue(request.ToXml().Contains("my_dsid"));
Assert.IsTrue(request.ToXml().Contains("fraud_merchant_id"));
Assert.IsTrue(request.ToXml().Contains("my_fmid"));
}
示例2: ToXml_Includes_PaymentMethodNonce
public void ToXml_Includes_PaymentMethodNonce()
{
CreditCardRequest request = new CreditCardRequest();
request.PaymentMethodNonce = "my-payment-method-nonce";
Assert.IsTrue(request.ToXml().Contains("my-payment-method-nonce"));
}
示例3: ToXml_Includes_FraudMerchantId
public void ToXml_Includes_FraudMerchantId()
{
CreditCardRequest request = new CreditCardRequest();
request.FraudMerchantId = "my_fmid";
Assert.IsTrue(request.ToXml().Contains("my_fmid"));
}
示例4: ToXml_Includes_DeviceSessionId
public void ToXml_Includes_DeviceSessionId()
{
CreditCardRequest request = new CreditCardRequest();
request.DeviceSessionId = "my_dsid";
Assert.IsTrue(request.ToXml().Contains("my_dsid"));
}