use of org.killbill.billing.client.model.HostedPaymentPageFormDescriptor 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 = killBillClient.buildFormDescriptor(hppFields, account.getAccountId(), null, ImmutableMap.<String, String>of(), requestOptions);
Assert.assertEquals(hostedPaymentPageFormDescriptor.getKbAccountId(), account.getAccountId());
}
use of org.killbill.billing.client.model.HostedPaymentPageFormDescriptor 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());
}
Aggregations