Code Monkey home page Code Monkey logo

sepawriter's Introduction

SepaWriter

Manage SEPA (Single Euro Payments Area) Credit and Debit Transfer for SEPA or international order. Only one PaymentInformation is managed but it can manage multiple transactions.

  • The debtor is common to all transactions in a Credit transfer.
  • The creditor is common to all transactions in a Debit transfer.

It follow "Customer Credit Transfer Initiation" <pain.001.001.03> defined in ISO 20022 but also some specific french rules (field used size != allowed size). Debit uses <pain.008.001.02> defined in ISO 20022 and the same french restrictions.

English usage guide : http://www.swift.com/assets/corporates/documents/our_solution/implementing_your_project_2009_iso20022_usage_guide.pdf

French usage guide : http://www.cfonb.org/fichiers/20130612091605_3_15_Guide_ISO20022_remises_informatisees_d_ordres_de_paiement_20100602_virement_V2.0_2010_06.pdf http://cfonb.inie.makoa.fr/fichiers/20131206162450_2_11_Guide_ISO20022_remises_informatisees_dordres_de_prelevement_SEPA_pain.008__v1.2__2013_12.pdf

Sample

Sample for a quick single transaction :

public class MySepaCreditTransfer
{
  private static SepaCreditTransfer GetCreditTransfertSample(decimal amount, string bic, string iban,
    string name, string comment)
  {
      var transfert = new SepaCreditTransfer
      {
          MessageIdentification = "uniqueCreditTransfertId",
          InitiatingPartyName = "Your name",
          // Below, your bank data
          Debtor = new SepaIbanData {Bic = "SOGEFRPPXXX", Iban = "FR7030002005500000157845Z02", Name = "My Corp"}          
      };

      transfert.AddCreditTransfer(new SepaCreditTransferTransaction
		{
			Creditor = new SepaIbanData {
			  Bic = bic,
			  Iban = iban,
			  Name = name
			},
			Amount = amount,
			RemittanceInformation = comment
		});
      return transfert;
  }

  public MySepaCreditTransfer()
  {
    var transfert = GetCreditTransfertSample(123.45m,  "AGRIFRPPXXX", "FR1420041010050500013M02606",
      "THEIR_NAME", "Payment sample");
    transfert.Save("sample.xml");
  }
}

Used libraries:

  • NUnit 3.7.1 for unit tests
  • Log4net 2.0.8 for log (used in XML validator)

License:

Copyright 2013-2017 PERRICHOT Florian

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

sepawriter's People

Contributors

perrich avatar developez avatar

Watchers

James Cloos avatar DaRKND avatar

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.