コード例 #1
0
ファイル: BillingDtoMapper.cs プロジェクト: zenit1/beame-lfe
 public static PaypalPaymentRequestDTO DirectCcToken2PaypalPaymentRequestDto(this PaypalCreditCardPaymentDTO dto, int userId, Guid requestId, BillingEnums.ePaypalRequestTypes type)
 {
     return(new PaypalPaymentRequestDTO
     {
         ReuqstId = requestId
         , UserId = userId
         , PaymentMethod = BillingEnums.ePaymentMethods.Credit_Card
         , PaypalRequestType = type
         , Amount = dto.amount
         , PriceLineId = dto.priceLineId
         , CourseId = dto.courseId
         , BundleId = dto.bundleId
         , TrackingID = dto.trackingId
         , AddressId = dto.addressId
         , PaymentInstrumentId = dto.paymentInstrumentId
         , CouponCode = dto.couponCode
     });
 }
コード例 #2
0
ファイル: BillingDtoMapper.cs プロジェクト: zenit1/beame-lfe
        public static Payer CreditCard2RestApiPayer(this PaypalCreditCardPaymentDTO dto, string payerEmail)
        {
            var creditCard = dto.card.CreditCardDto2RestApiCreditCard();

            var fundInstrument = new FundingInstrument {
                credit_card = creditCard
            };

            var fundingInstrumentList = new List <FundingInstrument> {
                fundInstrument
            };

            return(new Payer
            {
                funding_instruments = fundingInstrumentList,
                payment_method = BillingEnums.ePaymentMethods.Credit_Card.EnumToLowerString(),
                payer_info = new PayerInfo
                {
                    email = payerEmail
                }
            });
        }