public string ConsumerAppLink(string orderId, string consumerId, PaymentApp.LinkType paymentType) { string response = null; var result = new CustomerAppLinkRequest(orderId, consumerId, paymentType).Execute(Api.Client); if (result.Status == 200) { response = result.Data; } else { response = result.Error; } return(response); }
public void FC_TestConsumerAppLink() { CreateUser(); CreateOrder(); string orderId = SampleObjects._order.Id; string consumerId = SampleObjects._user.Id; PaymentApp.LinkType linkType = PaymentApp.LinkType.Payment; try { string response = lender.Apps.ConsumerAppLink(orderId, consumerId, linkType); Assert.IsNotNull(response, String.Format("Expected Success message of Getting Consumer Application Link, Actual: {0}", response)); } catch (Exception e) { throw new Exception(e.ToString()); } }
public CustomerAppLinkRequest(string orderId, string consumerId, PaymentApp.LinkType paymentType) : base("lender/{order_id}/{consumer_id}/{link_type}", Method.GET) { AddParameter("order_id", orderId, ParameterType.UrlSegment); AddParameter("consumer_id", consumerId, ParameterType.UrlSegment); AddParameter("link_type", PaymentApp.LinkTypeToString(paymentType), ParameterType.UrlSegment); }