use of org.killbill.billing.client.model.gen.PluginProperty in project killbill by killbill.
the class KillbillClient method getPaymentMethodCCProperties.
protected List<PluginProperty> getPaymentMethodCCProperties() {
final List<PluginProperty> properties = new ArrayList<PluginProperty>();
properties.add(new PluginProperty("type", "CreditCard", false));
properties.add(new PluginProperty("cardType", "Visa", false));
properties.add(new PluginProperty("cardHolderName", "Mr Sniff", false));
properties.add(new PluginProperty("expirationDate", "2015-08", false));
properties.add(new PluginProperty("maskNumber", "3451", false));
properties.add(new PluginProperty("address1", "23, rue des cerisiers", false));
properties.add(new PluginProperty("address2", "", false));
properties.add(new PluginProperty("city", "Toulouse", false));
properties.add(new PluginProperty("country", "France", false));
properties.add(new PluginProperty("postalCode", "31320", false));
properties.add(new PluginProperty("state", "Midi-Pyrenees", false));
return properties;
}
use of org.killbill.billing.client.model.gen.PluginProperty in project killbill by killbill.
the class KillbillClient method getPaymentMethodPaypalProperties.
protected List<PluginProperty> getPaymentMethodPaypalProperties() {
final List<PluginProperty> properties = new ArrayList<PluginProperty>();
properties.add(new PluginProperty("type", "CreditCard", false));
properties.add(new PluginProperty("email", "zouzou@laposte.fr", false));
properties.add(new PluginProperty("baid", "23-8787d-R", false));
return properties;
}
use of org.killbill.billing.client.model.gen.PluginProperty in project killbill by killbill.
the class TestPaymentPluginProperties method addProperty.
private void addProperty(final String key, final String value, List<PluginProperty> bodyProperties, final List<org.killbill.billing.payment.api.PluginProperty> expectProperties) {
bodyProperties.add(new PluginProperty(key, value, false));
expectProperties.add(new org.killbill.billing.payment.api.PluginProperty(key, value, false));
}
use of org.killbill.billing.client.model.gen.PluginProperty in project killbill by killbill.
the class TestPaymentMethod method testSearchPaymentMethods.
@Test(groups = "slow", description = "Can search payment methods")
public void testSearchPaymentMethods() throws Exception {
// Search random key
Assert.assertEquals(paymentMethodApi.searchPaymentMethods(UUID.randomUUID().toString(), null, NULL_PLUGIN_PROPERTIES, requestOptions).size(), 0);
Assert.assertEquals(paymentMethodApi.searchPaymentMethods(UUID.randomUUID().toString(), PLUGIN_NAME, NULL_PLUGIN_PROPERTIES, requestOptions).size(), 0);
// Create a payment method
final List<PluginProperty> pmProperties = new ArrayList<PluginProperty>();
pmProperties.add(new PluginProperty("CC_NAME", "Bozo", false));
pmProperties.add(new PluginProperty("CC_CITY", "SF", false));
pmProperties.add(new PluginProperty("CC_LAST_4", "4365", false));
pmProperties.add(new PluginProperty("CC_STATE", "CA", false));
pmProperties.add(new PluginProperty("CC_COUNTRY", "Zimbawe", false));
final Account accountJson = createAccountWithDefaultPaymentMethod(UUID.randomUUID().toString(), pmProperties);
final PaymentMethod paymentMethodJson = paymentMethodApi.getPaymentMethod(accountJson.getPaymentMethodId(), false, true, NULL_PLUGIN_PROPERTIES, AuditLevel.NONE, requestOptions);
// Search random key again
Assert.assertEquals(paymentMethodApi.searchPaymentMethods(UUID.randomUUID().toString(), null, NULL_PLUGIN_PROPERTIES, requestOptions).size(), 0);
Assert.assertEquals(paymentMethodApi.searchPaymentMethods(UUID.randomUUID().toString(), PLUGIN_NAME, NULL_PLUGIN_PROPERTIES, requestOptions).size(), 0);
// Last 4
doSearch("4365", paymentMethodJson);
// Name
doSearch("Bozo", paymentMethodJson);
// City
doSearch("SF", paymentMethodJson);
// State
doSearch("CA", paymentMethodJson);
// Country
doSearch("Zimbawe", paymentMethodJson);
}
Aggregations