コード例 #1
0
ファイル: BillingExtensions.cs プロジェクト: zenit1/beame-lfe
        //
        public static BillingEnums.eTransactionTypes PaypalRequestType2TransactionType(this BillingEnums.ePaypalRequestTypes type)
        {
            switch (type)
            {
            case BillingEnums.ePaypalRequestTypes.ACCOUNT_PAYMENT:
                return(BillingEnums.eTransactionTypes.DirectPaymentTransaction);

            case BillingEnums.ePaypalRequestTypes.CC_DIRECT:
                return(BillingEnums.eTransactionTypes.DirectCreditCardPayment);

            case BillingEnums.ePaypalRequestTypes.CC_PAY_WITH_SAVED:
                return(BillingEnums.eTransactionTypes.SavedCreditCardPayment);

            default:
                return(BillingEnums.eTransactionTypes.Undefined);
            }
        }
コード例 #2
0
ファイル: BillingDtoMapper.cs プロジェクト: zenit1/beame-lfe
 public static PaypalPaymentRequestDTO AccountPaymentToken2PaypalPaymentRequestDto(this PayPalCreatePaymentDTO dto, int userId, Guid requestId, string payment_id, BillingEnums.ePaypalRequestTypes type)
 {
     return(new PaypalPaymentRequestDTO
     {
         ReuqstId = requestId
         , UserId = userId
         , CreatePaymentId = payment_id
         , PaymentMethod = BillingEnums.ePaymentMethods.Paypal
         , 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
     });
 }
コード例 #3
0
ファイル: BillingDtoMapper.cs プロジェクト: zenit1/beame-lfe
 public static PaypalPaymentRequestDTO PaypalPaymentRequestDTO2PaypalPaymentRequestDto(this PaypalPaymentRequestDTO 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
         , CouponCode = dto.CouponCode
     });
 }
コード例 #4
0
ファイル: BillingDtoMapper.cs プロジェクト: zenit1/beame-lfe
 public static PaypalPaymentRequestDTO SourceRequest2PaypalPaymentRequestDto(this PAYPAL_PaymentRequests request, Guid requestId, decimal amount, BillingEnums.ePaypalRequestTypes type)
 {
     return(new PaypalPaymentRequestDTO
     {
         ReuqstId = requestId
         , UserId = request.UserId
         , PaymentMethod = Utils.ParseEnum <BillingEnums.ePaymentMethods>(request.PaymentMethodId)
         , PaypalRequestType = type
         , Amount = amount
         , PriceLineId = request.PriceLineId
         , CourseId = request.CourseId
         , BundleId = request.BundleId
         , TrackingID = request.TrackingID
         , AddressId = request.AddressId
         , PaymentInstrumentId = request.InstrumentId
         , CouponCode = request.CouponCode
         , SourceReuqstId = request.RequestId
     });
 }
コード例 #5
0
ファイル: BillingDtoMapper.cs プロジェクト: zenit1/beame-lfe
 public static PaypalPaymentRequestDTO OrderLine2PaypalCancelSubscriptionRequestDto(this vw_SALE_OrderLines request, Guid requestId, BillingEnums.ePaypalRequestTypes type)
 {
     return(new PaypalPaymentRequestDTO
     {
         ReuqstId = requestId
         , UserId = request.BuyerUserId
         , PaymentMethod = Utils.ParseEnum <BillingEnums.ePaymentMethods>(request.PaymentMethodId)
         , PaypalRequestType = type
         , Amount = 0
         , CourseId = request.CourseId
         , BundleId = request.BundleId
         , TrackingID = request.TrackingID
         , AddressId = request.AddressId
         , PaymentInstrumentId = request.InstrumentId
         , CouponCode = request.CouponCode
     });
 }
コード例 #6
0
ファイル: BillingDtoMapper.cs プロジェクト: zenit1/beame-lfe
 public static PaypalPaymentRequestDTO DirectCcToken2PaypalPaymentRequestDto(this SubscriptionWithSavedCardDTO dto, decimal amount, Guid requestId, BillingEnums.ePaypalRequestTypes type)
 {
     return(new PaypalPaymentRequestDTO
     {
         ReuqstId = requestId
         , UserId = dto.UserId
         , PaymentMethod = BillingEnums.ePaymentMethods.Credit_Card
         , PaypalRequestType = type
         , Amount = amount
         , PriceLineId = dto.priceLineId
         , CourseId = dto.courseId
         , BundleId = dto.bundleId
         , TrackingID = dto.trackingId
         , AddressId = dto.addressId
         , PaymentInstrumentId = dto.paymentInstrumentId
         , CouponCode = dto.couponCode
     });
 }