Search in sources :

Example 41 with Payment

use of org.killbill.billing.client.model.Payment in project killbill by killbill.

the class TestChargeback method testBadRequest.

@Test(groups = "slow", description = "Cannot add a badly formatted chargeback")
public void testBadRequest() throws Exception {
    final Payment payment = createAccountWithInvoiceAndPayment();
    final InvoicePaymentTransaction input = new InvoicePaymentTransaction();
    input.setPaymentId(payment.getPaymentId());
    try {
        killBillClient.createInvoicePaymentChargeback(input, createdBy, reason, comment);
        fail();
    } catch (final KillBillClientException e) {
    }
}
Also used : Payment(org.killbill.billing.client.model.Payment) InvoicePayment(org.killbill.billing.client.model.InvoicePayment) InvoicePaymentTransaction(org.killbill.billing.client.model.InvoicePaymentTransaction) KillBillClientException(org.killbill.billing.client.KillBillClientException) Test(org.testng.annotations.Test)

Example 42 with Payment

use of org.killbill.billing.client.model.Payment in project killbill by killbill.

the class TestChargeback method testAddChargeback.

@Test(groups = "slow", description = "Can create a chargeback")
public void testAddChargeback() throws Exception {
    final Payment payment = createAccountWithInvoiceAndPayment();
    createAndVerifyChargeback(payment);
}
Also used : Payment(org.killbill.billing.client.model.Payment) InvoicePayment(org.killbill.billing.client.model.InvoicePayment) Test(org.testng.annotations.Test)

Aggregations

Payment (org.killbill.billing.client.model.Payment)42 Test (org.testng.annotations.Test)35 Account (org.killbill.billing.client.model.Account)24 PaymentTransaction (org.killbill.billing.client.model.PaymentTransaction)19 InvoicePayment (org.killbill.billing.client.model.InvoicePayment)18 BigDecimal (java.math.BigDecimal)17 ComboPaymentTransaction (org.killbill.billing.client.model.ComboPaymentTransaction)15 InvoicePaymentTransaction (org.killbill.billing.client.model.InvoicePaymentTransaction)15 UUID (java.util.UUID)13 InvoicePayments (org.killbill.billing.client.model.InvoicePayments)8 Payments (org.killbill.billing.client.model.Payments)8 TransactionType (org.killbill.billing.payment.api.TransactionType)8 InvoiceItem (org.killbill.billing.client.model.InvoiceItem)7 DateTime (org.joda.time.DateTime)6 KillBillClientException (org.killbill.billing.client.KillBillClientException)5 Invoice (org.killbill.billing.client.model.Invoice)4 Invoices (org.killbill.billing.client.model.Invoices)4 PaymentMethod (org.killbill.billing.client.model.PaymentMethod)4 PaymentMethodPluginDetail (org.killbill.billing.client.model.PaymentMethodPluginDetail)4 RequestOptions (org.killbill.billing.client.RequestOptions)2