Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using MundiAPI.PCL;
- using MundiAPI.PCL.Models;
- namespace GerenciandoCarteira_Wallet {
- class Program {
- static void Main(string[] args) {
- string basicAuthUserName = "sk_test_4AdjlqpseatnmgbW";
- // Senha em branco. Passando apenas a secret key
- string basicAuthPassword = "";
- var client = new MundiAPIClient(basicAuthUserName, basicAuthPassword);
- var charge = new CreateChargeRequest() {
- CustomerId = "cus_aGvrM1lCvxUKW9N7",
- Amount = 5000,
- Payment = new CreatePaymentRequest() {
- PaymentMethod = "credit_card",
- CreditCard = new CreateCreditCardPaymentRequest() {
- CardId = "card_qBkxRKtmEfgyv1Zd",
- Card = new CreateCardRequest(){
- Cvv = "123"
- }
- }
- },
- };
- var createCharge = client.Charges.CreateCharge(charge);
- }
- }
- }
Add Comment
Please, Sign In to add comment