mirror of
https://github.com/valitydev/antifraud.git
synced 2024-11-06 01:45:22 +00:00
Merge pull request #3 from rbkmoney/ft/AN-1/Impl
AN-1: update thrift party protocol details
This commit is contained in:
commit
539f754272
@ -51,7 +51,7 @@ public class ModelConverter {
|
||||
model.put("id", payment.getInvoiceId() + "." + payment.getPaymentId());
|
||||
model.put("description", payment.getDescription());
|
||||
model.put("amount", payment.getAmount() / 100.);//todo get minor value from DM conf
|
||||
model.put("currency", payment.getCurrency());
|
||||
model.put("currency", "RUR");
|
||||
return model;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ af.username=
|
||||
af.password=
|
||||
af.conn.maxidle=10
|
||||
af.conn.keepalive=300000
|
||||
af.conn.timeout=3000
|
||||
af.conn.timeout=5000
|
||||
#spring.datasource.type=com.zaxxer.hikari.HikariDataSource
|
||||
#spring.datasource.driver-class-name=org.postgresql.Driver
|
||||
#spring.datasource.url=@db.url@
|
||||
|
@ -54,7 +54,7 @@ public class AfServiceTest {
|
||||
public static Context createContext() {
|
||||
return new Context(
|
||||
new PaymentInfo(
|
||||
new Shop("2035728______",
|
||||
new Shop("2035728",
|
||||
new Category("pizza", "no category"),
|
||||
new ShopDetails("pizza-sushi"),
|
||||
new ShopLocation() {{
|
||||
|
@ -15,23 +15,52 @@ import static com.rbkmoney.antifraud.thirdparty.AfServiceTest.createContext;
|
||||
|
||||
@Ignore
|
||||
public class ThirdPartyTest {
|
||||
|
||||
AfService service = new AfService("https://rbkmoney.antifraud.link/PreAuthorization.ashx", "ya.arc2011@yandex.ru", "Rbkmoney_2016__", 1, 1000, 7000);
|
||||
@Test
|
||||
public void test() {
|
||||
AfService service = new AfService("https://rbkmoneytest.antifraud.link/PreAuthorization.ashx", "ya.arc2011@yandex.ru", "Rbkmoney_2016", 1, 1000, 7000);
|
||||
public void test1() {
|
||||
testLgbtNew();
|
||||
//testLgbtNew();
|
||||
//testLgbtNew();
|
||||
}
|
||||
|
||||
public void testLgbtOld() {
|
||||
Payment payment = new Payment();
|
||||
payment.setDescription("drugs guns murder");
|
||||
payment.setClientFingerprint("11111111111111111111111111111111111111");
|
||||
payment.setInvoiceId(System.currentTimeMillis()+"");
|
||||
payment.setPaymentId(System.currentTimeMillis()+"");
|
||||
payment.setDescription("gays donation");
|
||||
payment.setClientFingerprint("11111111111111111111111111111111111112");
|
||||
payment.setClientIp("192.42.116.16");
|
||||
payment.setClientEmail("v.pankrashkin@rbkmoney.com");
|
||||
payment.setCardMask("424242******4242");
|
||||
//payment.setCardMask("411111******1111");
|
||||
payment.setCardToken("477bba133c182267fe5f086924abdc5db71f77bfc27f01f2843f2cdc69d89f05");
|
||||
payment.setAmount(9000000000000000000L);
|
||||
payment.setShopId("2035728a");
|
||||
payment.setPartyId("");
|
||||
payment.setShopName("pizza-sushi");
|
||||
payment.setShopUrl("http://www.pizza-sushi.com/");
|
||||
payment.setAmount(90000l);
|
||||
payment.setShopId("");
|
||||
payment.setPartyId("2033985");
|
||||
payment.setShopName("lgbtnet.org");
|
||||
payment.setShopUrl("https://www.lgbtnet.org/");
|
||||
payment.setCurrency("RUB");
|
||||
|
||||
System.out.println(service.inspect(payment)
|
||||
);
|
||||
}
|
||||
|
||||
public void testLgbtNew() {
|
||||
Payment payment = new Payment();
|
||||
payment.setInvoiceId(System.currentTimeMillis()+"");
|
||||
payment.setPaymentId(System.currentTimeMillis()+"");
|
||||
payment.setDescription("gays donation");
|
||||
payment.setClientFingerprint("11111111111111111111111111111111111113");
|
||||
payment.setClientIp("192.42.116.17");
|
||||
payment.setClientEmail("123@rbkmoney.com");
|
||||
payment.setCardMask("424242******4243");
|
||||
//payment.setCardMask("411111******1111");
|
||||
payment.setCardToken("477bba133c182267fe5f086924abdc5db71f77bfc27f01f2843f2cdc69d89f0f");
|
||||
payment.setAmount(90000l);
|
||||
payment.setShopId("2");
|
||||
payment.setPartyId("6954b4d1-f39f-4cc1-8843-eae834e6f849");
|
||||
payment.setShopName("help.lgbtnet.org");
|
||||
payment.setShopUrl("https://help.lgbtnet.org/");
|
||||
payment.setCurrency("RUB");
|
||||
|
||||
System.out.println(service.inspect(payment)
|
||||
|
@ -9,11 +9,11 @@ info.damsel.version=@damsel.version@
|
||||
endpoints.health.sensitive=false
|
||||
|
||||
af.url=https://rbkmoneytest.antifraud.link/PreAuthorization.ashx
|
||||
af.username=ya.arc2011@yandex.ru
|
||||
af.password=Rbkmoney_2016
|
||||
af.username=n.bocharov@rbkmoney.com
|
||||
af.password=wO5a5cj_Xw
|
||||
af.conn.maxidle=10
|
||||
af.conn.keepalive=300000
|
||||
af.conn.timeout=60000
|
||||
af.conn.timeout=600000
|
||||
#spring.datasource.type=com.zaxxer.hikari.HikariDataSource
|
||||
#spring.datasource.driver-class-name=org.postgresql.Driver
|
||||
#spring.datasource.url=@db.url@
|
||||
|
Loading…
Reference in New Issue
Block a user