From 01e3637ac95f5ececf88bf18492832dd42d23e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Ro=C4=8Dek?= <122279630+drocek@users.noreply.github.com> Date: Tue, 10 Sep 2024 12:02:46 +0200 Subject: [PATCH 1/6] CF-674: add note to identity via extension (#932) --- .../server/extensions/IExtensionContext.java | 26 +++++++++++++------ .../extensions/TestExtensionContext.java | 17 ++++++++++++ 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java index 461da7fff..817159be2 100644 --- a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java @@ -1,5 +1,5 @@ /************************************************************************************* - * Copyright (C) 2014-2020 GENERAL BYTES s.r.o. All rights reserved. + * Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved. * * This software may be distributed and modified under the terms of the GNU * General Public License version 2 (GPL2) as published by the Free Software @@ -308,6 +308,16 @@ public interface IExtensionContext { */ boolean addIdentityPiece(String identityPublicId, IIdentityPiece iidentityPiece); + /** + * Add note to identity. + * @param identityPublicId Public ID of identity. + * @param note Text of note. + * @return Return true if note has been set to the identity. Otherwise, return false. + */ + default boolean addNoteToIdentity(String identityPublicId, String note) { + return false; + } + /** * Update an existing personal info identity piece. * @@ -508,13 +518,13 @@ public static class EmbeddedEmailImage { * @throws BuyException */ ITransactionBuyInfo buyCrypto(String terminalSerialNumber, BigDecimal fiatAmount, String fiatCurrency, BigDecimal cryptoAmount, String cryptoCurrency, String destinationAddress, String identityPublicId, String discountCode) throws BuyException; - /** - * Call this transaction to create a cash back transaction. After this call server will allocate cash for the customer that can visit machine and withdraw cash. - * @param fiatAmount - * @param fiatCurrency - * @param identityPublicId - * @return - read ITransactionSellInfo.getTransactionUUID() to find out what should be filled in sell QR code. - */ + /** + * Call this transaction to create a cash back transaction. After this call server will allocate cash for the customer that can visit machine and withdraw cash. + * @param fiatAmount + * @param fiatCurrency + * @param identityPublicId + * @return - read ITransactionSellInfo.getTransactionUUID() to find out what should be filled in sell QR code. + */ ITransactionCashbackInfo cashback(String terminalSerialNumber, BigDecimal fiatAmount, String fiatCurrency, String identityPublicId) throws CashbackException; diff --git a/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/TestExtensionContext.java b/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/TestExtensionContext.java index 4fa5b1892..e913b13f2 100644 --- a/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/TestExtensionContext.java +++ b/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/TestExtensionContext.java @@ -1,3 +1,20 @@ +/************************************************************************************* + * Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved. + * + * This software may be distributed and modified under the terms of the GNU + * General Public License version 2 (GPL2) as published by the Free Software + * Foundation and appearing in the file GPL2.TXT included in the packaging of + * this file. Please note that GPL2 Section 2[b] requires that all works based + * on this software must also be made publicly available under the terms of + * the GPL2 ("Copyleft"). + * + * Contact information + * ------------------- + * + * GENERAL BYTES s.r.o. + * Web : http://www.generalbytes.com + * + ************************************************************************************/ package com.generalbytes.batm.server.extensions; import com.generalbytes.batm.server.extensions.aml.verification.ApplicantCheckResult; From f5c0812a08ae9a06f6cd972f56c8f4351a6aa648 Mon Sep 17 00:00:00 2001 From: Filip Ocelka Date: Tue, 10 Sep 2024 12:03:16 +0200 Subject: [PATCH 2/6] Increase project version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 271bc0207..1074551f3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # buildscript - project id projectGroup=com.generalbytes.batm.public -projectVersion=1.7.4 +projectVersion=1.7.5 # buildscript - common dependency versions bitrafaelVersion=1.0.44 From 6b30d85585debd4cff9c0d2260214c1d4e3e5212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Ro=C4=8Dek?= <122279630+drocek@users.noreply.github.com> Date: Wed, 18 Sep 2024 08:26:26 +0200 Subject: [PATCH 3/6] CF-672: added transfer methods to receipt details + added method to get custom string value (#936) --- .../server/extensions/IExtensionContext.java | 15 ++++++++++++ .../server/extensions/IReceiptDetails.java | 9 +++++++- .../extensions/ReceiptTransferMethod.java | 23 +++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ReceiptTransferMethod.java diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java index 817159be2..faa971d5e 100644 --- a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java @@ -862,4 +862,19 @@ public static class EmbeddedEmailImage { * @param serverTimeToUnlock The absolute datetime when the transaction should unlock. */ void unlockTransaction(String rid, Date serverTimeToUnlock); + + /** + * Returns the custom string value set in CAS. + * + * @param serialNumber Terminal or GB Safe serial number. + * @param customStringName Name of custom string. + * @param language Language in the ISO standard (for example 'en' for English, 'de' for German, 'de_CH' for Swiss German etc.). + * For default value, set language to {@code "default"} or leave blank. If no value is found for the specified + * language, the value for the default language will be returned (if available), otherwise {@code null}. + * @return Custom string value from the selected terminal or GB Safe in the selected language. Returns {@code null} if not found. + */ + default String getCustomStringValue(String serialNumber, String customStringName, String language) { + return null; + } + } diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IReceiptDetails.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IReceiptDetails.java index eb0d75a05..cfcd81815 100644 --- a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IReceiptDetails.java +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IReceiptDetails.java @@ -1,5 +1,5 @@ /************************************************************************************* - * Copyright (C) 2014-2020 GENERAL BYTES s.r.o. All rights reserved. + * Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved. * * This software may be distributed and modified under the terms of the GNU * General Public License version 2 (GPL2) as published by the Free Software @@ -17,6 +17,8 @@ ************************************************************************************/ package com.generalbytes.batm.server.extensions; +import java.util.Set; + public interface IReceiptDetails { String CUSTOM_DATA_RECEIPT_LANGUAGE = "receipt.language"; @@ -49,4 +51,9 @@ public interface IReceiptDetails { */ String getUserLanguage(); + /** + * @return Methods used to send the receipt. It always contains at least one transfer method. + */ + Set getTransferMethods(); + } diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ReceiptTransferMethod.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ReceiptTransferMethod.java new file mode 100644 index 000000000..5b86ea95b --- /dev/null +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ReceiptTransferMethod.java @@ -0,0 +1,23 @@ +/************************************************************************************* + * Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved. + * + * This software may be distributed and modified under the terms of the GNU + * General Public License version 2 (GPL2) as published by the Free Software + * Foundation and appearing in the file GPL2.TXT included in the packaging of + * this file. Please note that GPL2 Section 2[b] requires that all works based + * on this software must also be made publicly available under the terms of + * the GPL2 ("Copyleft"). + * + * Contact information + * ------------------- + * + * GENERAL BYTES s.r.o. + * Web : http://www.generalbytes.com + * + ************************************************************************************/ +package com.generalbytes.batm.server.extensions; + +public enum ReceiptTransferMethod { + SMS, + EMAIL +} \ No newline at end of file From 4044b037322cfd157e743a50fbcfefd3c3e1b349 Mon Sep 17 00:00:00 2001 From: Filip Ocelka Date: Wed, 18 Sep 2024 08:26:55 +0200 Subject: [PATCH 4/6] Increase project version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1074551f3..098752715 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # buildscript - project id projectGroup=com.generalbytes.batm.public -projectVersion=1.7.5 +projectVersion=1.7.6 # buildscript - common dependency versions bitrafaelVersion=1.0.44 From 2f233c6fa9e5208dbfdee3575c9bb960595dc6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Ro=C4=8Dek?= <122279630+drocek@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:28:51 +0200 Subject: [PATCH 5/6] CF-672: added properties to transaction detail and changed method returning custom string data (#937) --- .../batm/server/extensions/ICustomString.java | 26 +++++++++++++++++++ .../server/extensions/IExtensionContext.java | 19 +++++++------- .../extensions/ITransactionDetails.java | 12 +++++++++ 3 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ICustomString.java diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ICustomString.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ICustomString.java new file mode 100644 index 000000000..5c83cc329 --- /dev/null +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ICustomString.java @@ -0,0 +1,26 @@ +package com.generalbytes.batm.server.extensions; + +public interface ICustomString { + + /** + * @return Name of custom string. + */ + default String getName() { + return null; + } + + /** + * @return Value of custom string. + */ + default String getValue() { + return null; + } + + /** + * @return Language in the ISO standard (for example 'en' for English, 'de' for German, 'de_CH' for Swiss German etc.). + */ + default String getLanguage() { + return null; + } + +} diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java index faa971d5e..5b230b9fc 100644 --- a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java @@ -35,6 +35,7 @@ import java.math.BigDecimal; import java.net.InetSocketAddress; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.List; @@ -864,17 +865,15 @@ public static class EmbeddedEmailImage { void unlockTransaction(String rid, Date serverTimeToUnlock); /** - * Returns the custom string value set in CAS. + * Returns the list of custom strings. * - * @param serialNumber Terminal or GB Safe serial number. - * @param customStringName Name of custom string. - * @param language Language in the ISO standard (for example 'en' for English, 'de' for German, 'de_CH' for Swiss German etc.). - * For default value, set language to {@code "default"} or leave blank. If no value is found for the specified - * language, the value for the default language will be returned (if available), otherwise {@code null}. - * @return Custom string value from the selected terminal or GB Safe in the selected language. Returns {@code null} if not found. - */ - default String getCustomStringValue(String serialNumber, String customStringName, String language) { - return null; + * @param serialNumber Serial number of terminal or GB Safe. + * @param customStringName Name of custom string. If null, returns all custom strings of selected terminal or GB Safe. + * @return Values of the selected custom string in all available languages from the selected terminal or GB Safe. + * Returns an empty list if no custom string is found. + */ + default List getCustomStrings(String serialNumber, String customStringName) { + return new ArrayList<>(); } } diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ITransactionDetails.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ITransactionDetails.java index 5de9b6037..c0243b76c 100644 --- a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ITransactionDetails.java +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ITransactionDetails.java @@ -329,4 +329,16 @@ public interface ITransactionDetails { * @return Payment type: CASH/PAYMENT_CARD */ String getPaymentType(); + + /** + * @return UUID of transaction. + */ + String getUuid(); + + /** + * Returns the name of the crypto setting used for the transaction. + * @return Name of crypto setting used for the transaction. + */ + String getNameOfCryptoSettingUsed(); + } From 5d7e4f6b6c5ef1050f9a693b197b795801cbf7bd Mon Sep 17 00:00:00 2001 From: Filip Ocelka Date: Wed, 18 Sep 2024 15:29:14 +0200 Subject: [PATCH 6/6] Increase project version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 098752715..7a32495df 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # buildscript - project id projectGroup=com.generalbytes.batm.public -projectVersion=1.7.6 +projectVersion=1.7.7 # buildscript - common dependency versions bitrafaelVersion=1.0.44