Code Monkey home page Code Monkey logo

sepa_king's Introduction

Ruby gem for creating SEPA XML files

Build Status Code Climate Coverage Status Gem Version

We love building payment applications! So after developing the DTAUS library for Ruby we move on with SEPA.

Features

This gem implements the following two messages out of the ISO 20022 standard:

  • Credit Transfer Initiation (pain.001.003.03, pain.001.002.03 and pain.001.001.03)
  • Direct Debit Initiation (pain.008.003.02, pain.008.002.02 and pain.008.001.02)

It handles the Specification of Data Formats v3.3 (2019-11-17).

BTW: pain is a shortcut for Payment Initiation.

Requirements

  • Ruby 2.7 or newer
  • ActiveModel 4.2 or newer (including 7.0)

Installation

gem install sepa_king

Usage

How to create the XML for Direct Debit Initiation (in German: "Lastschriften")

# First: Create the main object
sdd = SEPA::DirectDebit.new(
  # Name of the initiating party and creditor, in German: "Auftraggeber"
  # String, max. 70 char
  name:       'Gläubiger GmbH',

  # OPTIONAL: Business Identifier Code (SWIFT-Code) of the creditor
  # String, 8 or 11 char
  bic:        'BANKDEFFXXX',

  # International Bank Account Number of the creditor
  # String, max. 34 chars
  iban:       'DE87200500001234567890',

  # Creditor Identifier, in German: Gläubiger-Identifikationsnummer
  # String, max. 35 chars
  creditor_identifier: 'DE98ZZZ09999999999'
)

# Second: Add transactions
sdd.add_transaction(
  # Name of the debtor, in German: "Zahlungspflichtiger"
  # String, max. 70 char
  name:                      'Zahlemann & Söhne GbR',

  # OPTIONAL: Business Identifier Code (SWIFT-Code) of the debtor's account
  # String, 8 or 11 char
  bic:                       'SPUEDE2UXXX',

  # International Bank Account Number of the debtor's account
  # String, max. 34 chars
  iban:                      'DE21500500009876543210',

  # Amount
  # Number with two decimal digit
  amount:                    39.99,

  # OPTIONAL: Currency, EUR by default (ISO 4217 standard)
  # String, 3 char
  currency:                  'EUR',

  # OPTIONAL: Instruction Identification, will not be submitted to the debtor
  # String, max. 35 char
  instruction:               '12345',

  # OPTIONAL: End-To-End-Identification, will be submitted to the debtor
  # String, max. 35 char
  reference:                 'XYZ/2013-08-ABO/6789',

  # OPTIONAL: Unstructured remittance information, in German "Verwendungszweck"
  # String, max. 140 char
  remittance_information:    'Vielen Dank für Ihren Einkauf!',

  # Mandate identifikation, in German "Mandatsreferenz"
  # String, max. 35 char
  mandate_id:                'K-02-2011-12345',

  # Mandate Date of signature, in German "Datum, zu dem das Mandat unterschrieben wurde"
  # Date
  mandate_date_of_signature: Date.new(2011,1,25),

  # Local instrument, in German "Lastschriftart"
  # One of these strings:
  #   'CORE' ("Basis-Lastschrift")
  #   'COR1' ("Basis-Lastschrift mit verkürzter Vorlagefrist")
  #   'B2B' ("Firmen-Lastschrift")
  local_instrument: 'CORE',

  # Sequence type
  # One of these strings:
  #   'FRST' ("Erst-Lastschrift")
  #   'RCUR' ("Folge-Lastschrift")
  #   'OOFF' ("Einmalige Lastschrift")
  #   'FNAL' ("Letztmalige Lastschrift")
  sequence_type: 'OOFF',

  # OPTIONAL: Requested collection date, in German "Fälligkeitsdatum der Lastschrift"
  # Date
  requested_date: Date.new(2013,9,5),

  # OPTIONAL: Enables or disables batch booking, in German "Sammelbuchung / Einzelbuchung"
  # True or False
  batch_booking: true

  # OPTIONAL: Use a different creditor account
  # CreditorAccount
  creditor_account: SEPA::CreditorAccount.new(
    name:                'Creditor Inc.',
    bic:                 'RABONL2U',
    iban:                'NL08RABO0135742099',
    creditor_identifier: 'NL53ZZZ091734220000'
  )

  # OPTIONAL: Specify the country & address of the debtor (REQUIRED for SEPA debits outside of EU. The individually required fields depend on the target country)
  debtor_address: SEPA::DebtorAddress.new(
    country_code:        'CH',
    # Not required if individual fields are used
    address_line1:       'Mustergasse 123a',
    address_line2:       '1234 Musterstadt'
    # Not required if address_line1 and address_line2 are used
    street_name:         'Mustergasse',
    building_number:     '123a',
    post_code:           '1234',
    town_name:           'Musterstadt'
  )
)
sdd.add_transaction ...

# Last: create XML string
xml_string = sdd.to_xml                    # Use schema pain.008.001.02
xml_string = sdd.to_xml('pain.008.002.02') # Use schema pain.008.002.02

How to create the XML for Credit Transfer Initiation (in German: "Überweisungen")

# First: Create the main object
sct = SEPA::CreditTransfer.new(
  # Name of the initiating party and debtor, in German: "Auftraggeber"
  # String, max. 70 char
  name: 'Schuldner GmbH',

  # OPTIONAL: Business Identifier Code (SWIFT-Code) of the debtor
  # String, 8 or 11 char
  bic:  'BANKDEFFXXX',

  # International Bank Account Number of the debtor
  # String, max. 34 chars
  iban: 'DE87200500001234567890'
)

# Second: Add transactions
sct.add_transaction(
  # Name of the creditor, in German: "Zahlungsempfänger"
  # String, max. 70 char
  name:                   'Telekomiker AG',

  # OPTIONAL: Business Identifier Code (SWIFT-Code) of the creditor's account
  # String, 8 or 11 char
  bic:                    'PBNKDEFF370',

  # International Bank Account Number of the creditor's account
  # String, max. 34 chars
  iban:                   'DE37112589611964645802',

  # Amount
  # Number with two decimal digit
  amount:                 102.50,

  # OPTIONAL: Currency, EUR by default (ISO 4217 standard)
  # String, 3 char
  currency:               'EUR',

  # OPTIONAL: Instruction Identification, will not be submitted to the creditor
  # String, max. 35 char
  instruction:               '12345',

  # OPTIONAL: End-To-End-Identification, will be submitted to the creditor
  # String, max. 35 char
  reference:              'XYZ-1234/123',

  # OPTIONAL: Unstructured remittance information, in German "Verwendungszweck"
  # String, max. 140 char
  remittance_information: 'Rechnung vom 22.08.2013',

  # OPTIONAL: Requested execution date, in German "Ausführungstermin"
  # Date
  requested_date: Date.new(2013,9,5),

  # OPTIONAL: Enables or disables batch booking, in German "Sammelbuchung / Einzelbuchung"
  # True or False
  batch_booking: true,

  # OPTIONAL: Urgent Payment
  # One of these strings:
  #   'SEPA' ("SEPA-Zahlung")
  #   'URGP' ("Taggleiche Eilüberweisung")
  service_level: 'URGP'

  # OPTIONAL: Unstructured information to indicate the purpose of the payment
  # String, max. 4 char
  category_purpose:         'SALA',

  # OPTIONAL: Specify the country & address of the creditor (REQUIRED for SEPA debits outside of EU. The individually required fields depend on the target country)
  creditor_address: SEPA::CreditorAddress.new(
    country_code:        'CH',
    # Not required if individual fields are used
    address_line1:       'Mustergasse 123a',
    address_line2:       '1234 Musterstadt'
    # Not required if address_line1 and address_line2 are used
    street_name:         'Mustergasse',
    building_number:     '123a',
    post_code:           '1234',
    town_name:           'Musterstadt'
  )
)
sct.add_transaction ...

# Last: create XML string
xml_string = sct.to_xml                    # Use schema pain.001.001.03
xml_string = sct.to_xml('pain.001.002.03') # Use schema pain.001.002.03

Validations

You can rely on our internal validations, raising errors when needed, during message creation. To validate your models holding SEPA related information (e.g. BIC, IBAN, mandate_id) you can use our validator classes or rely on some constants.

Examples:

class BankAccount < ActiveRecord::Base
  # IBAN validation, by default it validates the attribute named "iban"
  validates_with SEPA::IBANValidator, field_name: :iban_the_terrible

  # BIC validation, by default it validates the attribute named "bic"
  validates_with SEPA::BICValidator, field_name: :bank_bic
end

class Payment < ActiveRecord::Base
  validates_inclusion_of :sepa_sequence_type, in: SEPA::DirectDebitTransaction::SEQUENCE_TYPES

  # Mandate ID validation, by default it validates the attribute named "mandate_id"
  validates_with SEPA::MandateIdentifierValidator, field_name: :mandate_id
end

Beware: The SEPA::IBANValidator is strict - e.g. it does not allow any spaces in the IBAN.

Also see:

Changelog

https://github.com/salesking/sepa_king/releases

Contributors

https://github.com/salesking/sepa_king/graphs/contributors

Resources

License

Released under the MIT license

Copyright (c) 2013-2022 Georg Leciejewski (SalesKing), Georg Ledermann (https://github.com/ledermann)

sepa_king's People

Contributors

averell23 avatar cles avatar corny avatar edwinv avatar elgrillo83 avatar fcsonline avatar flori avatar isc avatar jeroenj avatar laurensn avatar ledermann avatar leoarnold avatar lnagel avatar magegu avatar moiristo avatar naxio avatar olleolleolle avatar p-wall avatar phillipp avatar prognostikos avatar rachid avatar scambra avatar schorsch avatar sigmike avatar skateinmars avatar stayhero avatar tilsammans avatar timoschilling avatar tobischo avatar uxxman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sepa_king's Issues

Implementation of further ebics messages

First, thanks for putting this software out on Github. It's super helpful and I use it to manage the finances of a small students association in Germany.

For the future I want to propose to implement the following ebics functionality as well:
– Request old protocols (transactions) PKT
– Cancel transactions made before

I am not an expert of the ebics standard, so please excuse this request if it does not make sense or goes against the goals of your library.

Thanks!

Pay in CHF

I am having trouble generating a XML file with this gem using pain.0001.001.03 and currency in CHF. When I upload the file to Credit Suisse test page to check the structure, it says

Currency 'CHF' is not allowed for payment type 5

. I think the problem is that using this gem, even if I don't set the service_level to 'SEPA', it is being automatically set to it for pain.0001.0001.03. If I just remove this part <PmtTpInf> <SvcLvl> <Cd>SEPA</Cd> </SvcLvl> </PmtTpInf>
from the xml, the file passes on the test. Can you provide a modification that would fix this? Like, if I don't provide the service_level information, the gem don't automatically sets it.

Implicit encondig

Hi all!

We ran into an issue with a bank: they require the encoding to be implicit at XML declaration.

Sepa King creates an XML like this:

<?xml version="1.0"?>

But they require it to be:

<?xml version="1.0" encoding="utf-8" ?>

Is there a way to add this attribute at the current version? I can't figure it out.

Thanks in advance and best regards!

Extend allowed characters in `InstanceMethods.convert_text`

Hello,

we're using this gem to initiate credit transfers for Greek banks.

The problem is that names of initiating parties and account beneficiaries can be in Greek. As we see here, the only letter characters allowed are Latin and German. This results in empty strings and therefore validation errors.

Would you accept a PR that adds Greek letters to the allowed set?

Direct debit group IBAN required

A valid account (IBAN and BIC) is required on the SEPA::DirectDebit object, otherwise validation fails[1].

But since the creditor IBAN is only used at the transaction level, why is it required at the top level?

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

Ability to set a custom CreDtTm

Hi!

In my case, the produced value for CreDtTm (Time.now.iso8601) includes a numeric time offset (the host date is set to CET, vie ene 20 13:37:31 CET 2017)

<CreDtTm>2017-01-20T12:06:07+00:00</CreDtTm>

and is not considered as a valid value for some Spanish banks (Liberbank in this case), it should be great the possibility to using a custom date.

I think fixed on PR #59.

Add support for special characters

Support for some special characters like German umlauts seems to have been added with SEPA 2.7.
sepa_king still replaces or even removes special characters in any given string. Shouldn't this limitation be removed? The use of i18n_transliterate and the resulting replacement of all umlauts is bugging me the most.

Missing InstrId support for Debits

The 3 known debit schemas (pain.008.003.02, pain.008.002.02, pain.008.001.02) all support the InstructionId field in the PaymentInformation next to the EndToEndId.
In sepa_king this field can be set using the instruction key when adding a transaction to a sepa document and it works for credits but not for debits. For debits it is even specifically mentioned in the README.

Is there a specific reason for this to be missing? Otherwise I'll prepare a pull request to add this, because we actually need this functionality.

Support for pain.008.001.02 and optional BIC

To initiate direct debits in France I have to use pain.008.001.02 and the BIC is optional. I'll prepare a pull request but I have a few questions first.

Adding support for pain.008.001.02 was trivial. I didn't change anything in the file generation and it was validated by my bank. But there are probably differences other than the version number. Will you merge support for pain.008.001.02 if the only difference with pain.008.002.02 is the version number?

My bank accepts pain.008.001.02 files without debtor BIC. But I think the specs says it's mandatory. Should we make the BIC optional?

Id in InitgPty tag

Spanish banks seem to require an Id tag inside the InitiatingParty (InitgPty) tag, not just a name. Something like:

<CstmrDrctDbtInitn>
<GrpHdr>
...
<InitgPty>
<Nm>COMPNAY NAME</Nm>
<Id>
<OrgId>
<Othr>
<Id>XXXXXXXXXXXXXX</Id>
</Othr>
</OrgId>
</Id>
</InitgPty>
</GrpHdr>

How can this be done? It seems it is not supported, isn't? Could you please add support for this?

In any case, thank you for this gem!

ChargerBearer SLEV wrongly set in xml when service_level is nil

<ChrgBr>SLEV</ChrgBr> means that the ChargerBearer is ServiceLevel.. When ServiceLevel is nil, it shouldn't be shown in the xml file.. Some Payments in CHF can be denied by the swiss bank institutions if this field is set as SLEV..

I created a small PR for that: #84

Incompatibility to Swiss Banks

Hi,

I'm not quite familiar with github and don't want be part of this project, but I've made some improvements you might want to include to this.

Swiss Banks are obviously using a special form of the ISO 20022 standard. They partially use limitations to fields and declare some fields as mandatory that are usually optionally and therefore not implemented here in this package.

See here for the implementation recommendations of SIX, that explain the Swiss modifications:
http://www.six-interbank-clearing.com/de/home/standardization/iso-payments/customer-bank/swiss-recommendations.html

I patched the following files to adapt this package, maybe you'd like to take over these changes to this project.

diff -rupN sepa_king-master/lib/sepa_king/message/direct_debit.rb sepa_king-patched/lib/sepa_king/message/direct_debit.rb
--- sepa_king-master/lib/sepa_king/message/direct_debit.rb  2015-03-31 07:44:59.000000000 +0200
+++ sepa_king-patched/lib/sepa_king/message/direct_debit.rb 2015-04-20 18:03:50.313914000 +0200
@@ -86,6 +86,9 @@ module SEPA
     def build_transaction(builder, transaction)
       builder.DrctDbtTxInf do
         builder.PmtId do
+          if transaction.instruction.present?
+            builder.InstrId(transaction.instruction)
+          end
           builder.EndToEndId(transaction.reference)
         end
         builder.InstdAmt('%.2f' % transaction.amount, Ccy: 'EUR')
diff -rupN sepa_king-master/lib/sepa_king/message.rb sepa_king-patched/lib/sepa_king/message.rb
--- sepa_king-master/lib/sepa_king/message.rb   2015-03-31 07:44:59.000000000 +0200
+++ sepa_king-patched/lib/sepa_king/message.rb  2015-04-20 18:17:54.105928000 +0200
@@ -103,6 +103,15 @@ module SEPA
         builder.CtrlSum('%.2f' % amount_total)
         builder.InitgPty do
           builder.Nm(account.name)
+          if account.class == CreditorAccount and account.creditor_identifier.present?
+            builder.Id do
+              builder.OrgId do
+                builder.Othr do
+                  builder.Id(account.creditor_identifier)
+                end
+              end
+            end
+          end
         end
       end
     end

Furthermore I got the following recommendations from our Swiss Bank:

(0001) Der Namespace 'urn:iso:std:iso:20022:tech:xsd:pain.008.003.02' wurde ersetzt durch 'http://www.six-interbank-clearing.com/de/pain.008.001.02.ch.01.xsd', um gegen das XML-Schema testen zu können.

(0001) Hinweis: Statt dem Schweizer XML-Schema wurde das ISO XML-Schema verwendet. Das zu verwendende XML-Schema ist mit den jeweiligen Finanzinstituten abzustimmen.

(0024) Hinweis: <NbOfTxs> wird in der Regel von den Schweizer Instituten nicht geprüft

(0025) Hinweis: <CtrlSum> wird in der Regel von den Schweizer Instituten nicht geprüft.

(0065) Hinweis: <EndToEndId> - In der Schweiz wird die Verwendung von maximal 16 Stellen empfohlen

Only important thing seems to be the change of the namespace, which is currently not possible to set with sepa_king. Maybe you can find a solution to pass it through or set it automatically for Swiss Bank connections.

Cheers,
Markus

Exposing detailed errors

Before submitting a pull request, I just want to check if you are open for this change. Message#add_transaction raises an ArgumentError exception when attributes have invalid data. But it only exposes them via a single error message. In our case, we would like to have them in a format like { bic: ['is invalid'] }. In general one can attach additional data to exceptions, which in this case would be quite useful.

Parsing/storing documents

Hi, thanks for the library, it's been a huge help!

Is there a recommended way to de-serialize the documents created by e.g. Sepa::CreditTransfer.new(...).to_xml? I'm currently storing a log of all the XML docs we submit, and getting data out of them later means a lot of Xpath. It would be great if there was some sort of from_xml method that would give me an object equivalent to the one I called to_xml on.

Use cases for me include test assertions and displaying useful details about what bank transactions we've initiated with a given document.

pain 001.001.03 ?

Hey guys,
Just wondering if there are any plans to add support for pain 001.001.02 or 001.001.03 schemas in this gem? If not could anyone point me in the direction of another gem that would cater for them? Thanks!

Plans to support SEPA 3.1

I really like your gem. Thank you for putting in the effort!
My question is, are there any plans to support the updated specifications of SEPA 3.1?
As far as I can tell, this library is still based around the 2.7 version vom late 2013 and some things have changed over the past few years like removing the COR1 option and no longer differentiating between first, last and recurring transactions.

Character encoding

Nokogiri has no encoding explicitly set on the XML builder. This means that it will encode all non-ascii-chars as character entities (e.g. ö). Some software really dislikes this.

The same thing is also causing #85 ...

Erroneous regular expressions

I've noticed errors in two regular expressions used in the validators:

In SEPA::CreditorIdentifierValidator:

REGEX = /\A[a-zA-Z]{2,2}[0-9]{2,2}([A-Za-z0-9]|[\+|\?|\/|\-|\:|\(|\)|\.|,|']){3,3}([A-Za-z0-9]|[\+|\?|\/|\-|:|\(|\)|\.|,|']){1,28}\z/
#                                             ^   ^  ^  ^  ^  ^  ^  ^  ^ ^
#                                             A   B  B  B  ...

Here, | is used as a meta-character for alternation to combine character classes (A) which is correct. But | is also used within a character class to combine its characters (B) which is wrong. Within a character class, | is treated as a literal character. You can't use it as a meta-character here.


In SEPA::MandateIdentifierValidator:

REGEX = /\A([A-Za-z0-9]|[\+|\?|\/|\-|\:|\(|\)|\.|\,|\']){1,35}\z/

• Again, | inside the character class (| is not allowed per spec)
• The "space" character is missing, which according to the spec is a valid character


Apart from the above errors, the regular expressions seem overly complex and are quite hard to read. For example, instead of defining two separate character classes which are joined via |, you can define the allowed characters in one character class which allows you to omit the capture group. You can also remove all of the escape characters by using %r|...| and by moving - to the end. Applied to MandateIdentifierValidator's regex:

REGEX = %r|\A[A-Za-z0-9 +?/:().,'-]{1,35}\z|

Support Swiss Payment Standards

Switzerland uses pain.001 and pain.008 Formats that are derived from the official SEPA standard.
These formats are defined by the SIX Group (https://www.six-group.com/interbank-clearing/de/home/standardization/iso-payments/customer-bank/implementation-guidelines.html).

While Swiss Payment Standards (SPS) are very similar to SEPA, they technically aren't part of it.
In order to support it regardless, the following formats would have to be supported:

Would you be willing to accept a PR that adds support for it? (even though it is technically not SEPA)

gemspec: Lowest Ruby version to support

Hi!

I am curious about the >=2.2 version specifier in the gemspec.

Could it be raised to a more-modern version, without losing a big chunk of this gem's audience? We are not running tests on non-supported Ruby versions, for example.

Requested Date: Today should also be valid

We are using sepa_king to generate SEPA Transfer files in order to tell our bank to transfer money to our customers.
We noticed that it sets the requested_date for CreditTransfers to the date after creation as default

The default seems ok - however, it is also not possible to pass in today as a date.

Is there a particular reason that it has to be the next day and today is specifically not allowed?
I couldn't find any documentation about it and our bank says setting the date to today is fine for them.
(We generate the files in the morning and give them to the bank to execute some time during the day)

Support for <SeqTp>

Support for different SequenceType
Currently, only OOF is supported. The following are missing: FRST, RCUR, FNAL

Support for pain.001.003.03 and pain.008.003.02

Hello,

first, thanks a lot for this gem. It will probably save us a lot of work. Are there any plans to support the new format specifications:

http://fuch.si/fj

Or can the currently implemented version still be used, is it backwards compatible? Sadly / fortunately we never had to deal with payment before, so we don't have any idea.

No length validation for PmtInfId

First of all, thanks for making this gem available!

During validation of the generated SEPA files I got an error that the value for PmtInfId was too long (max 35 characters). It would be nice if the length of this field was validated.

Multiple batches in one file

Hi all,

I am not a big expert in Sepa so maybe the following is a stupid question. Our contract with the bank has a limited amount of money that can be collected in one sepa batch. Our current workaround for this is to create multiple seperate batches (in different sepa files) and upload this to the bank. This works fine, but is not ideal since we need to create multiple sepa files and therefore have different collections in our system. Is it possible to keep those different batches (since we have to by our contract) but group them in one file? I heard sometime ago that this should be possible within the SEPA standard. Is this true? And how can I do this within sepa_king?

Would like the hear from you!

Use new hash syntax

Since we dont test with ruby 1.8.7 we could use the shiny new hash: 'syntax'

Using BICValidator in model and passing a custom field name.

class Company < ActiveRecord::Base
validates_with SEPA::BICValidator, field_name: :bank_bic
end

undefined method `bic' for #Company:0x007fb814508448

It seems like the validator doesn't recognize the the options passed in the validates_with method, am I missing something ?

=> Company.validators
"SEPA::BICValidator:0x007fd322fc0bf0 @options={:field_name=>:bank_bic}"

Generate pain.008, pacs.003 XML

i'am trying to development java project to generate pain.008, pacs.003 XML ,
it's doable using sepa_king? if there example how can do this ?

External Organization Identifier Code

Hi!

Finnish banks (including Nordea bank) require the 001.001.03 XML to contain a Creditor Identifier and an External Organization Identifier Code for their SEPA transfers.

I've created PR #73 which allows for adding a Creditor Identifier to DebtorAccount and External Organization Identifier Code for Account (as it should be available for both creditor as debtor).

Sources:

No Structure Message?

Not as much of an issue as being curious. Why only providing unstructured message for CT's?

[BREAKING] sepa_king v0.11.1 breaks rake CLI command

Given a project which uses RVM and has its own RVM gemset
when I install sepa_king v0.11.1 using bundle install,
then a binstub called rake(!) is created
thereby overwriting the binstub created by the rake gem itself.

The erroneously created binstub:

#!/usr/bin/env ruby_executable_hooks
#
# This file was generated by RubyGems.
#
# The application 'sepa_king' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0.a"

if ARGV.first
  str = ARGV.first
  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
  if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
    version = $1
    ARGV.shift
  end
end

if Gem.respond_to?(:activate_bin_path)
load Gem.activate_bin_path('sepa_king', 'rake', version)
else
gem "sepa_king", version
load Gem.bin_path("sepa_king", "rake", version)
end

loads sepa_king/bin/rake which then loads rake/exe/rake
but the gem repository paths are not managed correctly,
resulting in error messages like

$ rake -T
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Could not find gem 'rspec' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.

even though bundle install will show that rspec was installed all along.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.