mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 17:37:00 +00:00
Merge branch 'develop' of https://github.com/OpenBankProject/OBP-API into develop
This commit is contained in:
commit
969e2888ef
@ -881,7 +881,9 @@ trait APIMethods200 {
|
||||
emptyObjectJson :: Nil,
|
||||
Catalogs(Core, PSD2, OBWG),
|
||||
List(apiTagAccount, apiTagTransaction))
|
||||
|
||||
|
||||
//Note: we already have the method: getTransactionsForBankAccount in V121.
|
||||
//The only difference here is "Core implies 'owner' view"
|
||||
lazy val getCoreTransactionsForBankAccount : PartialFunction[Req, Box[User] => Box[JsonResponse]] = {
|
||||
//get transactions
|
||||
case "my" :: "banks" :: BankId(bankId) :: "accounts" :: AccountId(accountId) :: "transactions" :: Nil JsonGet json => {
|
||||
|
||||
@ -646,6 +646,7 @@ object KafkaMappedConnector_vMar2017 extends Connector with Loggable {
|
||||
}
|
||||
}
|
||||
val optionalParams : Seq[QueryParam[MappedTransaction]] = Seq(limit.toSeq, offset.toSeq, fromDate.toSeq, toDate.toSeq, ordering.toSeq).flatten
|
||||
//TODO no filter now.
|
||||
val mapperParams = Seq(By(MappedTransaction.bank, bankId.value), By(MappedTransaction.account, accountId.value)) ++ optionalParams
|
||||
|
||||
val req = OutboundTransactionsQueryWithParams(
|
||||
@ -1092,7 +1093,7 @@ object KafkaMappedConnector_vMar2017 extends Connector with Loggable {
|
||||
transactionRequestType: TransactionRequestType,
|
||||
chargePolicy: String): Box[TransactionId] = {
|
||||
|
||||
val postedDate = ZonedDateTime.now.toString
|
||||
val postedDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.ENGLISH).format(now)
|
||||
val transactionId = UUID.randomUUID().toString
|
||||
|
||||
val req =
|
||||
|
||||
@ -589,13 +589,13 @@ object ObpJvmMappedConnector extends Connector with Loggable {
|
||||
|
||||
// toCounterparty
|
||||
if( transactionRequestType.value == "SANDBOX_TAN" ) {
|
||||
fields.put("toCounterpartyId", toAccount.accountId.value)
|
||||
fields.put("toCounterpartyName", toAccount.name)
|
||||
fields.put("toCounterpartyId", toAccount.accountId.value)//not used
|
||||
fields.put("toCounterpartyName", toAccount.name)//optional name, no need to be correct
|
||||
fields.put("toCounterpartyCurrency", toAccount.currency)
|
||||
fields.put("toCounterpartyRoutingAddress", toAccount.accountId.value)
|
||||
fields.put("toCounterpartyRoutingScheme", "OBP")
|
||||
fields.put("toCounterpartyRoutingAddress", toAccount.accountId.value) //BENEFICIARY_ACCOUNT_NUMBER
|
||||
fields.put("toCounterpartyRoutingScheme", "BKCOM_ACCOUNT")
|
||||
fields.put("toCounterpartyBankRoutingAddress", toAccount.bankId.value)
|
||||
fields.put("toCounterpartyBankRoutingScheme", "OBP")
|
||||
fields.put("toCounterpartyBankRoutingScheme", "BKCOM_ACCOUNT")
|
||||
} else if( transactionRequestType.value == "SEPA" ||
|
||||
transactionRequestType.value == "COUNTERPARTY") {
|
||||
fields.put("toCounterpartyId", toCounterparty.counterpartyId)
|
||||
@ -618,8 +618,8 @@ object ObpJvmMappedConnector extends Connector with Loggable {
|
||||
val transactionId = transactionUUID.patch(transactionUUID.lastIndexOf('-'), "", 1)
|
||||
|
||||
// fromAccount
|
||||
fields.put("fromAccountName", fromAccount.name)
|
||||
fields.put("fromAccountId", fromAccount.accountId.value)
|
||||
fields.put("fromAccountName", fromAccount.name) //optional name, no need to be correct
|
||||
fields.put("fromAccountId", fromAccount.accountId.value)//DEBTOR_ACCOUNT_NUMBER
|
||||
fields.put("fromAccountBankId", fromAccount.bankId.value)
|
||||
fields.put("fromAccountCurrency", fromAccount.currency)
|
||||
|
||||
@ -629,10 +629,10 @@ object ObpJvmMappedConnector extends Connector with Loggable {
|
||||
fields.put("transactionAmount", amount.bigDecimal.toString)
|
||||
fields.put("transactionCurrency", fromAccount.currency)
|
||||
fields.put("transactionChargePolicy", chargePolicy)
|
||||
fields.put("transactionChargeAmount", "0.0") // TODO get correct charge amount
|
||||
fields.put("transactionChargeAmount", "7155.0000") // TODO this maybe change
|
||||
fields.put("transactionChargeCurrency", fromAccount.currency) // TODO get correct charge currency
|
||||
fields.put("transactionDescription", description)
|
||||
fields.put("transactionPostedDate", postedDate)
|
||||
fields.put("transactionPostedDate", "2016-01-21T18:46:19.056Z")//postedDate) // TODO get correct charge currency, details in TAG_EXECUTION_DATE
|
||||
|
||||
// might be useful, e.g. for tracking purpose, to
|
||||
// send id of the user requesting transaction
|
||||
|
||||
Loading…
Reference in New Issue
Block a user