Guest User

Untitled

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