Search in sources :

Example 1 with HostedPaymentPageFields

use of org.killbill.billing.client.model.gen.HostedPaymentPageFields 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, null);
    final HostedPaymentPageFields hppFields = new HostedPaymentPageFields();
    final ComboHostedPaymentPage comboHostedPaymentPage = new ComboHostedPaymentPage(account, paymentMethod, hppFields, ImmutableList.<PluginProperty>of(), null);
    final HostedPaymentPageFormDescriptor hostedPaymentPageFormDescriptor = paymentGatewayApi.buildComboFormDescriptor(comboHostedPaymentPage, NULL_PLUGIN_NAMES, NULL_PLUGIN_PROPERTIES, requestOptions);
    Assert.assertNotNull(hostedPaymentPageFormDescriptor.getKbAccountId());
}
Also used : Account(org.killbill.billing.client.model.gen.Account) HostedPaymentPageFormDescriptor(org.killbill.billing.client.model.gen.HostedPaymentPageFormDescriptor) HostedPaymentPageFields(org.killbill.billing.client.model.gen.HostedPaymentPageFields) ComboHostedPaymentPage(org.killbill.billing.client.model.gen.ComboHostedPaymentPage) PaymentMethodPluginDetail(org.killbill.billing.client.model.gen.PaymentMethodPluginDetail) PaymentMethod(org.killbill.billing.client.model.gen.PaymentMethod) Test(org.testng.annotations.Test)

Example 2 with HostedPaymentPageFields

use of org.killbill.billing.client.model.gen.HostedPaymentPageFields in project killbill by killbill.

the class TestPaymentGateway method testBuildFormDescriptor.

@Test(groups = "slow")
public void testBuildFormDescriptor() throws Exception {
    final Account account = createAccountWithDefaultPaymentMethod();
    final HostedPaymentPageFields hppFields = new HostedPaymentPageFields();
    final HostedPaymentPageFormDescriptor hostedPaymentPageFormDescriptor = paymentGatewayApi.buildFormDescriptor(account.getAccountId(), hppFields, null, NULL_PLUGIN_NAMES, NULL_PLUGIN_PROPERTIES, requestOptions);
    Assert.assertEquals(hostedPaymentPageFormDescriptor.getKbAccountId(), account.getAccountId());
}
Also used : Account(org.killbill.billing.client.model.gen.Account) HostedPaymentPageFormDescriptor(org.killbill.billing.client.model.gen.HostedPaymentPageFormDescriptor) HostedPaymentPageFields(org.killbill.billing.client.model.gen.HostedPaymentPageFields) Test(org.testng.annotations.Test)

Aggregations

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