Search in sources :

Example 1 with ComboHostedPaymentPage

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

the class TestPaymentGateway method testComboBuildFormDescriptor.

@Test(groups = "slow")
public void testComboBuildFormDescriptor() throws Exception {
    final Account account = getAccount();
    account.setAccountId(null);
    final PaymentMethodPluginDetail info = new PaymentMethodPluginDetail();
    final PaymentMethod paymentMethod = new PaymentMethod(null, UUID.randomUUID().toString(), null, true, PLUGIN_NAME, info);
    final HostedPaymentPageFields hppFields = new HostedPaymentPageFields();
    final ComboHostedPaymentPage comboHostedPaymentPage = new ComboHostedPaymentPage(account, paymentMethod, ImmutableList.<PluginProperty>of(), hppFields);
    final HostedPaymentPageFormDescriptor hostedPaymentPageFormDescriptor = killBillClient.buildFormDescriptor(comboHostedPaymentPage, ImmutableMap.<String, String>of(), requestOptions);
    Assert.assertNotNull(hostedPaymentPageFormDescriptor.getKbAccountId());
}
Also used : Account(org.killbill.billing.client.model.Account) HostedPaymentPageFormDescriptor(org.killbill.billing.client.model.HostedPaymentPageFormDescriptor) HostedPaymentPageFields(org.killbill.billing.client.model.HostedPaymentPageFields) ComboHostedPaymentPage(org.killbill.billing.client.model.ComboHostedPaymentPage) PaymentMethodPluginDetail(org.killbill.billing.client.model.PaymentMethodPluginDetail) PaymentMethod(org.killbill.billing.client.model.PaymentMethod) Test(org.testng.annotations.Test)

Aggregations

Account (org.killbill.billing.client.model.Account)1 ComboHostedPaymentPage (org.killbill.billing.client.model.ComboHostedPaymentPage)1 HostedPaymentPageFields (org.killbill.billing.client.model.HostedPaymentPageFields)1 HostedPaymentPageFormDescriptor (org.killbill.billing.client.model.HostedPaymentPageFormDescriptor)1 PaymentMethod (org.killbill.billing.client.model.PaymentMethod)1 PaymentMethodPluginDetail (org.killbill.billing.client.model.PaymentMethodPluginDetail)1 Test (org.testng.annotations.Test)1