public void TestSettingNullsInPaymentRequestModel() { var urlDetails = new UrlDetails { BackUrl = null, FailureUrl = null, NotificationUrl = null, PendingUrl = null, SuccessUrl = null }; var userDetails = new CashierUserDetails { FirstName = null, LastName = null, Address = null, City = null, Country = null, Email = null, County = null, DateOfBirth = null, Phone = null, State = null, Zip = null }; var userAddress = new UserAddress { FirstName = null, LastName = null, Address = null, City = null, Country = null, Email = null, Cell = null, County = null, Phone = null, State = null, Zip = null }; var browserDetails = new DeviceDetails { Browser = null, DeviceName = null, DeviceOS = null, DeviceType = null, IpAddress = null }; var dynamicDescriptor = new DynamicDescriptor { MerchantName = null, MerchantPhone = null }; _ = new PaymentRequest(merchantInfo, sessionToken, currency, amount, paymentOptionCard) { AmountDetails = null, BillingAddress = userAddress, CustomData = null, CustomSiteName = null, DeviceDetails = browserDetails, DynamicDescriptor = dynamicDescriptor, ProductId = null, RelatedTransactionId = null, UrlDetails = urlDetails, UserDetails = userDetails, Items = null }; Assert.Pass(); }
public async Task <Authorize3dResponse> Authorize3d( string currency, string amount, PaymentOption paymentOption, string relatedTransactionId, List <Item> items = null, string userTokenId = null, string clientUniqueId = null, string clientRequestId = null, int?isRebilling = null, AmountDetails amountDetails = null, DeviceDetails deviceDetails = null, CashierUserDetails userDetails = null, UserAddress shippingAddress = null, UserAddress billingAddress = null, DynamicDescriptor dynamicDescriptor = null, MerchantDetails merchantDetails = null, Addendums addendums = null, UrlDetails urlDetails = null, string customSiteName = null, string productId = null, string customData = null, string transactionType = null, bool autoPayment3D = default, string userId = null, string rebillingType = null, string authenticationTypeOnly = null, SubMerchant subMerchant = null) { var request = new Authorize3dRequest(merchantInfo, sessionToken, currency, amount, paymentOption, relatedTransactionId) { Items = items, UserTokenId = userTokenId, ClientRequestId = clientRequestId, ClientUniqueId = clientUniqueId, IsRebilling = isRebilling, AmountDetails = amountDetails, DeviceDetails = deviceDetails, UserDetails = userDetails, ShippingAddress = shippingAddress, BillingAddress = billingAddress, DynamicDescriptor = dynamicDescriptor, MerchantDetails = merchantDetails, Addendums = addendums, UrlDetails = urlDetails, CustomSiteName = customSiteName, ProductId = productId, CustomData = customData, TransactionType = transactionType, AutoPayment3D = autoPayment3D, UserId = userId, RebillingType = rebillingType, AuthenticationTypeOnly = authenticationTypeOnly, SubMerchant = subMerchant }; return(await safechargeRequestExecutor.Authorize3d(request)); }
public async Task <OpenOrderResponse> OpenOrder( string currency, string amount, List <Item> items = null, OpenOrderPaymentOption paymentOption = null, UserPaymentOption userPaymentOption = null, string paymentMethod = null, string userTokenId = null, string clientUniqueId = null, string clientRequestId = null, string userId = null, string authenticationTypeOnly = null, AmountDetails amountDetails = null, DeviceDetails deviceDetails = null, CashierUserDetails userDetails = null, UserAddress shippingAddress = null, UserAddress billingAddress = null, DynamicDescriptor dynamicDescriptor = null, MerchantDetails merchantDetails = null, Addendums addendums = null, UrlDetails urlDetails = null, string customSiteName = null, string productId = null, string customData = null, string transactionType = null, string isMoto = null, string isRebilling = null, string rebillingType = null, SubMerchant subMerchant = null) { var request = new OpenOrderRequest(merchantInfo, sessionToken, currency, amount) { Items = items, PaymentOption = paymentOption, UserPaymentOption = userPaymentOption, PaymentMethod = paymentMethod, UserTokenId = userTokenId, ClientRequestId = clientRequestId, ClientUniqueId = clientUniqueId, UserId = userId, AuthenticationTypeOnly = authenticationTypeOnly, AmountDetails = amountDetails, DeviceDetails = deviceDetails, UserDetails = userDetails, ShippingAddress = shippingAddress, BillingAddress = billingAddress, DynamicDescriptor = dynamicDescriptor, MerchantDetails = merchantDetails, Addendums = addendums, UrlDetails = urlDetails, CustomSiteName = customSiteName, ProductId = productId, CustomData = customData, TransactionType = transactionType, IsMoto = isMoto, IsRebilling = isRebilling, RebillingType = rebillingType, SubMerchant = subMerchant }; return(await safechargeRequestExecutor.OpenOrder(request)); }