-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #664 from civihost/sddreq
Add CBIBdySDDReq_00_01_00 SEPA format by @masetto
- Loading branch information
Showing
14 changed files
with
192 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/*-------------------------------------------------------+ | ||
| Project 60 - SEPA direct debit | | ||
| Copyright (C) 2016-2018 | | ||
| Author: @scardinius | | ||
+--------------------------------------------------------+ | ||
| This program is released as free software under the | | ||
| Affero GPL license. You can redistribute it and/or | | ||
| modify it under the terms of this license which you | | ||
| can read by viewing the included agpl.txt or online | | ||
| at www.gnu.org/licenses/agpl.html. Removal of this | | ||
| copyright header is strictly prohibited without | | ||
| written permission from the original author(s). | | ||
+--------------------------------------------------------*/ | ||
|
||
class CRM_Sepa_Logic_Format_CBIBdySDDReq_00_01_00 extends CRM_Sepa_Logic_Format { | ||
|
||
} | ||
|
70 changes: 70 additions & 0 deletions
70
templates/Sepa/Formats/CBIBdySDDReq_00_01_00/transaction-details.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<PMRQ:PmtInf xmlns:PMRQ="urn:CBI:xsd:CBISDDReqLogMsg.00.01.00"> | ||
<PMRQ:PmtInfId>{$group.reference}</PMRQ:PmtInfId> | ||
<PMRQ:PmtMtd>DD</PMRQ:PmtMtd> | ||
<PMRQ:PmtTpInf> | ||
<PMRQ:SvcLvl> | ||
<PMRQ:Cd>SEPA</PMRQ:Cd> | ||
</PMRQ:SvcLvl> | ||
<PMRQ:LclInstrm> | ||
<PMRQ:Cd>CORE</PMRQ:Cd> | ||
</PMRQ:LclInstrm> | ||
<PMRQ:SeqTp>{$group.type}</PMRQ:SeqTp> | ||
<PMRQ:CtgyPurp> | ||
<PMRQ:Cd>OTHR</PMRQ:Cd> | ||
</PMRQ:CtgyPurp> | ||
</PMRQ:PmtTpInf> | ||
<PMRQ:ReqdColltnDt>{$group.collection_date|crmDate:"%Y-%m-%d"}</PMRQ:ReqdColltnDt> | ||
<PMRQ:Cdtr> | ||
<PMRQ:Nm>{$creditor.name}</PMRQ:Nm> | ||
</PMRQ:Cdtr> | ||
<PMRQ:CdtrAcct> | ||
<PMRQ:Id> | ||
<PMRQ:IBAN>{$creditor.iban}</PMRQ:IBAN> | ||
</PMRQ:Id> | ||
</PMRQ:CdtrAcct> | ||
<PMRQ:CdtrAgt> | ||
<PMRQ:FinInstnId> | ||
<PMRQ:ClrSysMmbId> | ||
<PMRQ:MmbId>{$creditor.iban|regex_replace:'/[A-Z][A-Z][0-9][0-9][A-Z]/':""|truncate:5:""}</PMRQ:MmbId> | ||
</PMRQ:ClrSysMmbId> | ||
</PMRQ:FinInstnId> | ||
</PMRQ:CdtrAgt> | ||
<PMRQ:CdtrSchmeId> | ||
<PMRQ:Nm>{$creditor.name}</PMRQ:Nm> | ||
<PMRQ:Id> | ||
<PMRQ:PrvtId> | ||
<PMRQ:Othr> | ||
<PMRQ:Id>{$creditor.identifier}</PMRQ:Id> | ||
</PMRQ:Othr> | ||
</PMRQ:PrvtId> | ||
</PMRQ:Id> | ||
</PMRQ:CdtrSchmeId> | ||
|
||
{foreach from=$contributions item="contribution"} | ||
<PMRQ:DrctDbtTxInf xmlns:PMRQ="urn:CBI:xsd:CBISDDReqLogMsg.00.01.00"> | ||
<PMRQ:PmtId> | ||
<PMRQ:InstrId>INSTRID-{$contribution.end2endID}</PMRQ:InstrId> | ||
<PMRQ:EndToEndId>{$contribution.end2endID}</PMRQ:EndToEndId> | ||
</PMRQ:PmtId> | ||
<PMRQ:InstdAmt Ccy="{$contribution.currency}">{$contribution.total_amount}</PMRQ:InstdAmt> | ||
<PMRQ:DrctDbtTx> | ||
<PMRQ:MndtRltdInf> | ||
<PMRQ:MndtId>{$contribution.reference}</PMRQ:MndtId> | ||
<PMRQ:DtOfSgntr>{$contribution.date|crmDate:"%Y-%m-%d"}</PMRQ:DtOfSgntr> | ||
</PMRQ:MndtRltdInf> | ||
</PMRQ:DrctDbtTx> | ||
<PMRQ:Dbtr> | ||
<PMRQ:Nm>{$contribution.display_name}</PMRQ:Nm> | ||
</PMRQ:Dbtr> | ||
<PMRQ:DbtrAcct> | ||
<PMRQ:Id> | ||
<PMRQ:IBAN>{$contribution.iban}</PMRQ:IBAN> | ||
</PMRQ:Id> | ||
</PMRQ:DbtrAcct> | ||
<PMRQ:RmtInf> | ||
<PMRQ:Ustrd>{$contribution.message}</PMRQ:Ustrd> | ||
</PMRQ:RmtInf> | ||
</PMRQ:DrctDbtTxInf> | ||
{/foreach} | ||
|
||
</PMRQ:PmtInf> |
3 changes: 3 additions & 0 deletions
3
templates/Sepa/Formats/CBIBdySDDReq_00_01_00/transaction-footer.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
</BODY:CBISDDReqLogMsg> | ||
</BODY:CBIEnvelSDDReqLogMsg> | ||
</BODY:CBIBdySDDReq> |
26 changes: 26 additions & 0 deletions
26
templates/Sepa/Formats/CBIBdySDDReq_00_01_00/transaction-header.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" standalone="yes"?> | ||
<BODY:CBIBdySDDReq xmlns:PMRQ="urn:CBI:xsd:CBISDDReqLogMsg.00.01.00" xmlns:BODY="urn:CBI:xsd:CBIBdySDDReq.00.01.00" xmlns:SGNT="urn:CBI:xsd:CBISgnInf.001.04"> | ||
<BODY:PhyMsgInf> | ||
<BODY:PhyMsgTpCd>INC-SDDC-01</BODY:PhyMsgTpCd> | ||
<BODY:NbOfLogMsg>1</BODY:NbOfLogMsg> | ||
</BODY:PhyMsgInf> | ||
<BODY:CBIEnvelSDDReqLogMsg> | ||
<BODY:CBISDDReqLogMsg xmlns:BODY="urn:CBI:xsd:CBIBdySDDReq.00.01.00"> | ||
<PMRQ:GrpHdr xmlns:PMRQ="urn:CBI:xsd:CBISDDReqLogMsg.00.01.00"> | ||
<PMRQ:MsgId>{$file.reference}</PMRQ:MsgId> | ||
{* for some reason, the seconds (%s) in the following line will not be converted correctly, hence 42 *} | ||
<PMRQ:CreDtTm>{$file.created_date|crmDate:"%Y-%m-%dT%H:%i:42"}</PMRQ:CreDtTm> | ||
<PMRQ:NbOfTxs>{$nbtransactions}</PMRQ:NbOfTxs> | ||
<PMRQ:CtrlSum>{$total}</PMRQ:CtrlSum> | ||
<PMRQ:InitgPty> | ||
<PMRQ:Nm>{$creditor.name}</PMRQ:Nm> | ||
<PMRQ:Id> | ||
<PMRQ:OrgId> | ||
<PMRQ:Othr> | ||
<PMRQ:Id>{$creditor.cuc}</PMRQ:Id> | ||
<PMRQ:Issr>CBI</PMRQ:Issr> | ||
</PMRQ:Othr> | ||
</PMRQ:OrgId> | ||
</PMRQ:Id> | ||
</PMRQ:InitgPty> | ||
</PMRQ:GrpHdr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters