Guest User

Untitled

a guest
Apr 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. using MundiAPI.PCL;
  2. using MundiAPI.PCL.Models;
  3.  
  4. namespace GerenciandoCarteira_Wallet {
  5. class Program {
  6. static void Main(string[] args) {
  7.  
  8. string basicAuthUserName = "sk_test_4AdjlqpseatnmgbW";
  9. // Senha em branco. Passando apenas a secret key
  10. string basicAuthPassword = "";
  11.  
  12. var client = new MundiAPIClient(basicAuthUserName, basicAuthPassword);
  13.  
  14. var charge = new CreateChargeRequest() {
  15. CustomerId = "cus_aGvrM1lCvxUKW9N7",
  16. Amount = 5000,
  17. Payment = new CreatePaymentRequest() {
  18. PaymentMethod = "credit_card",
  19. CreditCard = new CreateCreditCardPaymentRequest() {
  20. CardId = "card_qBkxRKtmEfgyv1Zd",
  21. Card = new CreateCardRequest(){
  22. Cvv = "123"
  23. }
  24. }
  25. },
  26. };
  27.  
  28. var createCharge = client.Charges.CreateCharge(charge);
  29. }
  30. }
  31. }
Add Comment
Please, Sign In to add comment