public RouteValueDictionary GetPaymentRoute(PaymentPart Part) { if (Part == null) { throw new ArgumentNullException("Part", "PaymentPart cannot be null."); } return new RouteValueDictionary(new { Area = "OShop.PayPal", Controller = "Payment", Action = "Create", Id = Part.ContentItem.Id }); }
public void AddTransaction(PaymentPart Part, PaymentTransactionRecord Transaction) { if (Part == null) { throw new ArgumentNullException("Part", "PaymentPart cannot be null."); } if (Transaction == null) { throw new ArgumentNullException("Transaction", "Transaction cannot be null."); } Transaction.PaymentPartRecord = Part.Record; _transactionRepository.Create(Transaction); }
public RouteValueDictionary GetPaymentRoute(PaymentPart Part) { if (Part == null) { throw new ArgumentNullException("Part", "PaymentPart cannot be null."); } return(new RouteValueDictionary(new { Area = "OShop", Controller = "OfflinePayment", Action = "Create", Id = Part.ContentItem.Id })); }
public override async Task <IDisplayResult> DisplayAsync(StripePaymentFormPart stripePaymentFormPart, BuildPartDisplayContext context) { var paymentPart = stripePaymentFormPart.ContentItem.As <PaymentPart>(); paymentPart = new PaymentPart() { Cost = 200 }; var paymentIntent = await _stripePaymentService.CreatePaymentIntent(paymentPart); return(Initialize <StripePaymentFormPartViewModel>("StripePaymentFormPart", m => { m.IntentCleintSecret = paymentIntent.ClientSecret; }) .Location("Detail", "Content:5") .Location("Summary", "Content:5")); }
public async Task <PaymentIntent> CreatePaymentIntent(PaymentPart paymentPart) { StripeConfiguration.ApiKey = ""; var options = new PaymentIntentCreateOptions { Amount = (long)paymentPart.Cost, Currency = "usd", // Verify your integrationsws in this guide by including this parameter Metadata = new Dictionary <string, string> { { "integration_checkk", "accept_a_paymentt" }, }, }; var service = new PaymentIntentService(); var paymentIntent = service.Create(options); return(paymentIntent); }
public RouteValueDictionary GetPaymentRoute(PaymentPart Part) { return null; }