PagarMe.init("api_key");
transaction = new Transaction();
transaction.setAmount(100);
transaction.setPaymentMethod(Transaction.PaymentMethod.CREDIT_CARD);
transaction.setCardHolderName("Lucas Dos Santos Alves");
transaction.setCardExpirationDate("0916");
transaction.setCardCvv("401");
transaction.setCardNumber("4111111111111111");
transaction.setInstallments(1);
transaction.setCapture(true);
transaction.save();
#### Creating customer object
Customer customer = new Customer();
customer.setName("lucas santos");
customer.setDocumentNumber("15317529506");
customer.setEmail("testelibjava@pagar.me");
#### Creating customer address object
Address address = new Address();
address.setStreet("Rua Piraju");
address.setStreetNumber("218");
address.setComplementary("ao lado da consigáz");
address.setNeighborhood("Interlagos");
address.setZipcode("29045482");
#### Creating customer phone object
Phone phone = new Phone();
phone.setDdd("11");
phone.setNumber("55284132");
#### Adding address & phone on the customer object
customer.setAddress(address);
customer.setPhone(phone);
#### Adding customer object to transaction object and create transaction
transaction.setCustomer(customer);
transaction.save();
transaction = new Transaction();
transaction.setAmount(100);
transaction.setPaymentMethod(Transaction.PaymentMethod.BOLETO);
transaction.save();
transaction = new Transaction();
transaction.find("transaction_id");
transaction = new Transaction();
transaction.findCollection(10,0);
transaction = new Transaction();
transaction.find("transaction_id");
transaction.refund(50);
transaction = new Transaction();
transaction.setAmount(100);
transaction.setPaymentMethod(Transaction.PaymentMethod.BOLETO);
transaction.save();
transaction = new Transaction();
transaction.setAmount(100);
transaction.setPaymentMethod(Transaction.PaymentMethod.BOLETO);
transaction.save();
#### Creating customer object
Customer customer = new Customer();
customer.setName("lucas santos");
customer.setDocumentNumber("15317529506");
customer.setEmail("testelibjava@pagar.me");
#### Creating customer address object
Address address = new Address();
address.setStreet("Rua Piraju");
address.setStreetNumber("218");
address.setComplementary("ao lado da consigáz");
address.setNeighborhood("Interlagos");
address.setZipcode("29045482");
#### Creating customer phone object
Phone phone = new Phone();
phone.setDdd("11");
phone.setNumber("55284132");
#### Adding address & phone on the customer object
customer.setAddress(address);
customer.setPhone(phone);
#### Save customer
customer.save();
Customer customer = new Customer();
customer.find("customer_id");
Customer customer = new Customer();
customer.find("customer_id");
Customer customer = new Customer();
customer.findCollection(10,0);