Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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());
            }
        }
Esempio n. 3
0
 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);
 }