Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using MundiAPI.PCL;
- using MundiAPI.PCL.Models;
- using System.Collections.Generic;
- namespace TutorialAssinatura {
- class Program {
- static void Main(string[] args) {
- string basicAuthUserName = "sk_test_39joaPCZQFyxA8zx";
- // Senha em branco. Passando apenas a secret key
- string basicAuthPassword = "";
- var client = new MundiAPIClient(basicAuthUserName, basicAuthPassword);
- var customer = new CreateCustomerRequest() {
- Name = "Gustavo Fonseca",
- Email = "Gustavo.fonseca@mundipagg.com"
- };
- var request = new CreatePlanRequest {
- Name = "Plano Gold",
- PaymentMethods = new List<string>() { "credit_card","boleto"},
- Items = new List<CreatePlanItemRequest> {
- new CreatePlanItemRequest {
- Name = "Musculação",
- Quantity = 1,
- PricingScheme = new CreatePricingSchemeRequest {
- Price = 18990
- }
- }
- }
- };
- var response = client.Plans.CreatePlan(request);
- }
- }
- }
Add Comment
Please, Sign In to add comment