Пример #1
0
 public HttpResponse<Card> CreateCard(string customerId, CardCreate requestModel)
 {
     var createCardUri = string.Format(ApiUrls.Cards, customerId);
     return new ApiHttpClient().PostRequest<Card>(createCardUri, AppSettings.SecretKey, requestModel);
 }
Пример #2
0
        public static CardCreate GetCardCreateModel(CardProvider cardProvider=CardProvider.Visa)
        {
            CardCreate card=new CardCreate();
            var baseCard = GetBaseCardModel(cardProvider);

            card.Name = baseCard.Name;
            card.ExpiryMonth = baseCard.ExpiryMonth;
            card.ExpiryYear = baseCard.ExpiryYear;
            card.BillingDetails = baseCard.BillingDetails;

            if (cardProvider == CardProvider.Visa)
            {
                card.Cvv = "100";
                card.Number = "4242424242424242";
            }
            else
            {
                card.Cvv = "257";
                card.Number = "5313581000123430";
            }

            return card;
        }