Example #1
0
 public static PAYPAL_PaymentRequests Dto2PaypalPaymentRequestEntity(this PaypalPaymentRequestDTO token)
 {
     return(new PAYPAL_PaymentRequests
     {
         RequestId = token.ReuqstId
         , UserId = token.UserId
         , RequestTypeId = (byte)token.PaypalRequestType
         , PaymentMethodId = (byte)token.PaymentMethod
         , PriceLineId = token.PriceLineId
         , Status = BillingEnums.ePaymentRequestStatus.init.ToString()
         , CreatePaymentId = token.CreatePaymentId
         , RecurringRequestToken = token.RecurringRequestToken
         , CourseId = token.CourseId
         , BundleId = token.BundleId
         , TrackingID = token.TrackingID
         , AddressId = token.AddressId
         , InstrumentId = token.PaymentInstrumentId
         , CouponCode = token.CouponCode
         , Amount = token.Amount
         , AddOn = DateTime.Now
         , CreatedBy = DtoExtensions.CurrentUserId
         , SourceRequestId = token.SourceReuqstId
     });
 }
Example #2
0
 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
     });
 }