Guest User

Untitled

a guest
Apr 20th, 2018
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. using MundiAPI.PCL;
  2. using MundiAPI.PCL.Models;
  3. using System;
  4.  
  5. namespace TutorialCobranca {
  6. class Program {
  7. static void Main(string[] args) {
  8.  
  9. // Neste exemplo estamos utilizando A sdk C# MundiAPI.PCL
  10.  
  11. string basicAuthUserName = "sk_test_4AdjlqpseatnmgbW";
  12. string basicAuthPassword = "";
  13.  
  14. var client = new MundiAPIClient(basicAuthUserName, basicAuthPassword);
  15.  
  16. var request = new CreateChargeRequest() {
  17. Amount = 1490,
  18. CustomerId = "cus_aGvrM1lCvxUKW9N7",
  19. Payment = new CreatePaymentRequest() {
  20. PaymentMethod = "boleto",
  21. Boleto = new CreateBoletoPaymentRequest() {
  22. Bank = "033",
  23. DueAt = DateTime.Now.AddDays(3)
  24. }
  25.  
  26. }
  27. };
  28.  
  29. var response = client.Charges.CreateCharge(request);
  30. }
  31. }
  32. }
Add Comment
Please, Sign In to add comment