├── LICENSE
├── README
├── doxyfile
└── dso
├── cielo
├── Cielo.php
├── CieloMode.php
├── CreditCard.php
├── ECI.php
├── PaymentProduct.php
├── Transaction.php
├── TransactionStatus.php
├── nodes
│ ├── AbstractCieloNode.php
│ ├── AuthenticationNode.php
│ ├── AuthorizationNode.php
│ ├── CancellationNode.php
│ ├── CaptureNode.php
│ ├── CardDataNode.php
│ ├── EcDataNode.php
│ ├── HolderDataNode.php
│ ├── OrderDataNode.php
│ ├── PaymentMethodNode.php
│ ├── TransactionNode.php
│ └── XMLNode.php
└── request
│ ├── AuthorizationRequest.php
│ ├── CancellationRequest.php
│ ├── CaptureRequest.php
│ ├── QueryRequest.php
│ ├── TIDRequest.php
│ └── TransactionRequest.php
└── http
├── CURL.php
├── HTTPRequest.php
└── HTTPRequestMethod.php
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU Lesser General Public License
2 | Version 2.1, February 1999
3 |
4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
5 |
6 | [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.]
7 |
8 | Preamble
9 | The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
10 |
11 | This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
12 |
13 | When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
14 |
15 | To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
16 |
17 | For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
18 |
19 | We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
20 |
21 | To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
22 |
23 | Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
24 |
25 | Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
26 |
27 | When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
28 |
29 | We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
30 |
31 | For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
32 |
33 | In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
34 |
35 | Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
36 |
37 | The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
38 |
39 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
40 | 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
41 |
42 | A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
43 |
44 | The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
45 |
46 | "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
47 |
48 | Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
49 |
50 | 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
51 |
52 | You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
53 |
54 | 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
55 |
56 | a) The modified work must itself be a software library.
57 |
58 | b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
59 |
60 | c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
61 |
62 | d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
63 |
64 | (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
65 |
66 | These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
67 |
68 | Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
69 |
70 | In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
71 |
72 | 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
73 |
74 | Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
75 |
76 | This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
77 |
78 | 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
79 |
80 | If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
81 |
82 | 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
83 |
84 | However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
85 |
86 | When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
87 |
88 | If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
89 |
90 | Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
91 |
92 | 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
93 |
94 | You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
95 |
96 | a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
97 |
98 | b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
99 |
100 | c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
101 |
102 | d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
103 |
104 | e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
105 |
106 | For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
107 |
108 | It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
109 |
110 | 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
111 |
112 | a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
113 |
114 | b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
115 |
116 | 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
117 |
118 | 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
119 |
120 | 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
121 |
122 | 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
123 |
124 | If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
125 |
126 | It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
127 |
128 | This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
129 |
130 | 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
131 |
132 | 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
133 |
134 | Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
135 |
136 | 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
137 |
138 | NO WARRANTY
139 |
140 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
141 |
142 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iMastersDev/cielo/cf63c17eeeb91591a6cd690efd1e0ec6078ab8d5/README
--------------------------------------------------------------------------------
/doxyfile:
--------------------------------------------------------------------------------
1 | # Doxyfile 1.6.2-20100208
2 |
3 | # This file describes the settings to be used by the documentation system
4 | # doxygen (www.doxygen.org) for a project
5 | #
6 | # All text after a hash (#) is considered a comment and will be ignored
7 | # The format is:
8 | # TAG = value [value, ...]
9 | # For lists items can also be appended using:
10 | # TAG += value [value, ...]
11 | # Values that contain spaces should be placed between quotes (" ")
12 |
13 | #---------------------------------------------------------------------------
14 | # Project related configuration options
15 | #---------------------------------------------------------------------------
16 |
17 | # This tag specifies the encoding used for all characters in the config file
18 | # that follow. The default is UTF-8 which is also the encoding used for all
19 | # text before the first occurrence of this tag. Doxygen uses libiconv (or the
20 | # iconv built into libc) for the transcoding. See
21 | # http://www.gnu.org/software/libiconv for the list of possible encodings.
22 |
23 | DOXYFILE_ENCODING = UTF-8
24 |
25 | # The PROJECT_NAME tag is a single word (or a sequence of words surrounded
26 | # by quotes) that should identify the project.
27 |
28 | PROJECT_NAME = Cielo
29 |
30 | # The PROJECT_NUMBER tag can be used to enter a project or revision number.
31 | # This could be handy for archiving the generated documentation or
32 | # if some version control system is used.
33 |
34 | PROJECT_NUMBER = 1.1.0
35 |
36 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
37 | # base path where the generated documentation will be put.
38 | # If a relative path is entered, it will be relative to the location
39 | # where doxygen was started. If left blank the current directory will be used.
40 |
41 | OUTPUT_DIRECTORY = doc
42 |
43 | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
44 | # 4096 sub-directories (in 2 levels) under the output directory of each output
45 | # format and will distribute the generated files over these directories.
46 | # Enabling this option can be useful when feeding doxygen a huge amount of
47 | # source files, where putting all generated files in the same directory would
48 | # otherwise cause performance problems for the file system.
49 |
50 | CREATE_SUBDIRS = NO
51 |
52 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all
53 | # documentation generated by doxygen is written. Doxygen will use this
54 | # information to generate all constant output in the proper language.
55 | # The default language is English, other supported languages are:
56 | # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
57 | # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
58 | # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
59 | # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
60 | # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
61 | # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
62 |
63 | OUTPUT_LANGUAGE = English
64 |
65 | # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
66 | # include brief member descriptions after the members that are listed in
67 | # the file and class documentation (similar to JavaDoc).
68 | # Set to NO to disable this.
69 |
70 | BRIEF_MEMBER_DESC = YES
71 |
72 | # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
73 | # the brief description of a member or function before the detailed description.
74 | # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
75 | # brief descriptions will be completely suppressed.
76 |
77 | REPEAT_BRIEF = YES
78 |
79 | # This tag implements a quasi-intelligent brief description abbreviator
80 | # that is used to form the text in various listings. Each string
81 | # in this list, if found as the leading text of the brief description, will be
82 | # stripped from the text and the result after processing the whole list, is
83 | # used as the annotated text. Otherwise, the brief description is used as-is.
84 | # If left blank, the following values are used ("$name" is automatically
85 | # replaced with the name of the entity): "The $name class" "The $name widget"
86 | # "The $name file" "is" "provides" "specifies" "contains"
87 | # "represents" "a" "an" "the"
88 |
89 | ABBREVIATE_BRIEF =
90 |
91 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
92 | # Doxygen will generate a detailed section even if there is only a brief
93 | # description.
94 |
95 | ALWAYS_DETAILED_SEC = YES
96 |
97 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
98 | # inherited members of a class in the documentation of that class as if those
99 | # members were ordinary class members. Constructors, destructors and assignment
100 | # operators of the base classes will not be shown.
101 |
102 | INLINE_INHERITED_MEMB = YES
103 |
104 | # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
105 | # path before files name in the file list and in the header files. If set
106 | # to NO the shortest path that makes the file name unique will be used.
107 |
108 | FULL_PATH_NAMES = NO
109 |
110 | # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
111 | # can be used to strip a user-defined part of the path. Stripping is
112 | # only done if one of the specified strings matches the left-hand part of
113 | # the path. The tag can be used to show relative paths in the file list.
114 | # If left blank the directory from which doxygen is run is used as the
115 | # path to strip.
116 |
117 | STRIP_FROM_PATH =
118 |
119 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
120 | # the path mentioned in the documentation of a class, which tells
121 | # the reader which header file to include in order to use a class.
122 | # If left blank only the name of the header file containing the class
123 | # definition is used. Otherwise one should specify the include paths that
124 | # are normally passed to the compiler using the -I flag.
125 |
126 | STRIP_FROM_INC_PATH =
127 |
128 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
129 | # (but less readable) file names. This can be useful is your file systems
130 | # doesn't support long names like on DOS, Mac, or CD-ROM.
131 |
132 | SHORT_NAMES = NO
133 |
134 | # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
135 | # will interpret the first line (until the first dot) of a JavaDoc-style
136 | # comment as the brief description. If set to NO, the JavaDoc
137 | # comments will behave just like regular Qt-style comments
138 | # (thus requiring an explicit @brief command for a brief description.)
139 |
140 | JAVADOC_AUTOBRIEF = YES
141 |
142 | # If the QT_AUTOBRIEF tag is set to YES then Doxygen will
143 | # interpret the first line (until the first dot) of a Qt-style
144 | # comment as the brief description. If set to NO, the comments
145 | # will behave just like regular Qt-style comments (thus requiring
146 | # an explicit \brief command for a brief description.)
147 |
148 | QT_AUTOBRIEF = NO
149 |
150 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
151 | # treat a multi-line C++ special comment block (i.e. a block of //! or ///
152 | # comments) as a brief description. This used to be the default behaviour.
153 | # The new default is to treat a multi-line C++ comment block as a detailed
154 | # description. Set this tag to YES if you prefer the old behaviour instead.
155 |
156 | MULTILINE_CPP_IS_BRIEF = NO
157 |
158 | # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
159 | # member inherits the documentation from any documented member that it
160 | # re-implements.
161 |
162 | INHERIT_DOCS = YES
163 |
164 | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
165 | # a new page for each member. If set to NO, the documentation of a member will
166 | # be part of the file/class/namespace that contains it.
167 |
168 | SEPARATE_MEMBER_PAGES = NO
169 |
170 | # The TAB_SIZE tag can be used to set the number of spaces in a tab.
171 | # Doxygen uses this value to replace tabs by spaces in code fragments.
172 |
173 | TAB_SIZE = 8
174 |
175 | # This tag can be used to specify a number of aliases that acts
176 | # as commands in the documentation. An alias has the form "name=value".
177 | # For example adding "sideeffect=\par Side Effects:\n" will allow you to
178 | # put the command \sideeffect (or @sideeffect) in the documentation, which
179 | # will result in a user-defined paragraph with heading "Side Effects:".
180 | # You can put \n's in the value part of an alias to insert newlines.
181 |
182 | ALIASES =
183 |
184 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
185 | # sources only. Doxygen will then generate output that is more tailored for C.
186 | # For instance, some of the names that are used will be different. The list
187 | # of all members will be omitted, etc.
188 |
189 | OPTIMIZE_OUTPUT_FOR_C = NO
190 |
191 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
192 | # sources only. Doxygen will then generate output that is more tailored for
193 | # Java. For instance, namespaces will be presented as packages, qualified
194 | # scopes will look different, etc.
195 |
196 | OPTIMIZE_OUTPUT_JAVA = NO
197 |
198 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
199 | # sources only. Doxygen will then generate output that is more tailored for
200 | # Fortran.
201 |
202 | OPTIMIZE_FOR_FORTRAN = NO
203 |
204 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
205 | # sources. Doxygen will then generate output that is tailored for
206 | # VHDL.
207 |
208 | OPTIMIZE_OUTPUT_VHDL = NO
209 |
210 | # Doxygen selects the parser to use depending on the extension of the files it parses.
211 | # With this tag you can assign which parser to use for a given extension.
212 | # Doxygen has a built-in mapping, but you can override or extend it using this tag.
213 | # The format is ext=language, where ext is a file extension, and language is one of
214 | # the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
215 | # Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
216 | # .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
217 | # use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
218 |
219 | EXTENSION_MAPPING =
220 |
221 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
222 | # to include (a tag file for) the STL sources as input, then you should
223 | # set this tag to YES in order to let doxygen match functions declarations and
224 | # definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
225 | # func(std::string) {}). This also make the inheritance and collaboration
226 | # diagrams that involve STL classes more complete and accurate.
227 |
228 | BUILTIN_STL_SUPPORT = NO
229 |
230 | # If you use Microsoft's C++/CLI language, you should set this option to YES to
231 | # enable parsing support.
232 |
233 | CPP_CLI_SUPPORT = NO
234 |
235 | # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
236 | # Doxygen will parse them like normal C++ but will assume all classes use public
237 | # instead of private inheritance when no explicit protection keyword is present.
238 |
239 | SIP_SUPPORT = NO
240 |
241 | # For Microsoft's IDL there are propget and propput attributes to indicate getter
242 | # and setter methods for a property. Setting this option to YES (the default)
243 | # will make doxygen to replace the get and set methods by a property in the
244 | # documentation. This will only work if the methods are indeed getting or
245 | # setting a simple type. If this is not the case, or you want to show the
246 | # methods anyway, you should set this option to NO.
247 |
248 | IDL_PROPERTY_SUPPORT = YES
249 |
250 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
251 | # tag is set to YES, then doxygen will reuse the documentation of the first
252 | # member in the group (if any) for the other members of the group. By default
253 | # all members of a group must be documented explicitly.
254 |
255 | DISTRIBUTE_GROUP_DOC = YES
256 |
257 | # Set the SUBGROUPING tag to YES (the default) to allow class member groups of
258 | # the same type (for instance a group of public functions) to be put as a
259 | # subgroup of that type (e.g. under the Public Functions section). Set it to
260 | # NO to prevent subgrouping. Alternatively, this can be done per class using
261 | # the \nosubgrouping command.
262 |
263 | SUBGROUPING = YES
264 |
265 | # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
266 | # is documented as struct, union, or enum with the name of the typedef. So
267 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct
268 | # with name TypeT. When disabled the typedef will appear as a member of a file,
269 | # namespace, or class. And the struct will be named TypeS. This can typically
270 | # be useful for C code in case the coding convention dictates that all compound
271 | # types are typedef'ed and only the typedef is referenced, never the tag name.
272 |
273 | TYPEDEF_HIDES_STRUCT = NO
274 |
275 | # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
276 | # determine which symbols to keep in memory and which to flush to disk.
277 | # When the cache is full, less often used symbols will be written to disk.
278 | # For small to medium size projects (<1000 input files) the default value is
279 | # probably good enough. For larger projects a too small cache size can cause
280 | # doxygen to be busy swapping symbols to and from disk most of the time
281 | # causing a significant performance penality.
282 | # If the system has enough physical memory increasing the cache will improve the
283 | # performance by keeping more symbols in memory. Note that the value works on
284 | # a logarithmic scale so increasing the size by one will rougly double the
285 | # memory usage. The cache size is given by this formula:
286 | # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
287 | # corresponding to a cache size of 2^16 = 65536 symbols
288 |
289 | SYMBOL_CACHE_SIZE = 0
290 |
291 | #---------------------------------------------------------------------------
292 | # Build related configuration options
293 | #---------------------------------------------------------------------------
294 |
295 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
296 | # documentation are documented, even if no documentation was available.
297 | # Private class members and static file members will be hidden unless
298 | # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
299 |
300 | EXTRACT_ALL = YES
301 |
302 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
303 | # will be included in the documentation.
304 |
305 | EXTRACT_PRIVATE = YES
306 |
307 | # If the EXTRACT_STATIC tag is set to YES all static members of a file
308 | # will be included in the documentation.
309 |
310 | EXTRACT_STATIC = YES
311 |
312 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
313 | # defined locally in source files will be included in the documentation.
314 | # If set to NO only classes defined in header files are included.
315 |
316 | EXTRACT_LOCAL_CLASSES = YES
317 |
318 | # This flag is only useful for Objective-C code. When set to YES local
319 | # methods, which are defined in the implementation section but not in
320 | # the interface are included in the documentation.
321 | # If set to NO (the default) only methods in the interface are included.
322 |
323 | EXTRACT_LOCAL_METHODS = YES
324 |
325 | # If this flag is set to YES, the members of anonymous namespaces will be
326 | # extracted and appear in the documentation as a namespace called
327 | # 'anonymous_namespace{file}', where file will be replaced with the base
328 | # name of the file that contains the anonymous namespace. By default
329 | # anonymous namespace are hidden.
330 |
331 | EXTRACT_ANON_NSPACES = YES
332 |
333 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
334 | # undocumented members of documented classes, files or namespaces.
335 | # If set to NO (the default) these members will be included in the
336 | # various overviews, but no documentation section is generated.
337 | # This option has no effect if EXTRACT_ALL is enabled.
338 |
339 | HIDE_UNDOC_MEMBERS = YES
340 |
341 | # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
342 | # undocumented classes that are normally visible in the class hierarchy.
343 | # If set to NO (the default) these classes will be included in the various
344 | # overviews. This option has no effect if EXTRACT_ALL is enabled.
345 |
346 | HIDE_UNDOC_CLASSES = YES
347 |
348 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
349 | # friend (class|struct|union) declarations.
350 | # If set to NO (the default) these declarations will be included in the
351 | # documentation.
352 |
353 | HIDE_FRIEND_COMPOUNDS = NO
354 |
355 | # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
356 | # documentation blocks found inside the body of a function.
357 | # If set to NO (the default) these blocks will be appended to the
358 | # function's detailed documentation block.
359 |
360 | HIDE_IN_BODY_DOCS = NO
361 |
362 | # The INTERNAL_DOCS tag determines if documentation
363 | # that is typed after a \internal command is included. If the tag is set
364 | # to NO (the default) then the documentation will be excluded.
365 | # Set it to YES to include the internal documentation.
366 |
367 | INTERNAL_DOCS = YES
368 |
369 | # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
370 | # file names in lower-case letters. If set to YES upper-case letters are also
371 | # allowed. This is useful if you have classes or files whose names only differ
372 | # in case and if your file system supports case sensitive file names. Windows
373 | # and Mac users are advised to set this option to NO.
374 |
375 | CASE_SENSE_NAMES = YES
376 |
377 | # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
378 | # will show members with their full class and namespace scopes in the
379 | # documentation. If set to YES the scope will be hidden.
380 |
381 | HIDE_SCOPE_NAMES = NO
382 |
383 | # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
384 | # will put a list of the files that are included by a file in the documentation
385 | # of that file.
386 |
387 | SHOW_INCLUDE_FILES = YES
388 |
389 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
390 | # will list include files with double quotes in the documentation
391 | # rather than with sharp brackets.
392 |
393 | FORCE_LOCAL_INCLUDES = NO
394 |
395 | # If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
396 | # is inserted in the documentation for inline members.
397 |
398 | INLINE_INFO = YES
399 |
400 | # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
401 | # will sort the (detailed) documentation of file and class members
402 | # alphabetically by member name. If set to NO the members will appear in
403 | # declaration order.
404 |
405 | SORT_MEMBER_DOCS = YES
406 |
407 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
408 | # brief documentation of file, namespace and class members alphabetically
409 | # by member name. If set to NO (the default) the members will appear in
410 | # declaration order.
411 |
412 | SORT_BRIEF_DOCS = YES
413 |
414 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
415 |
416 | SORT_MEMBERS_CTORS_1ST = NO
417 |
418 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
419 | # hierarchy of group names into alphabetical order. If set to NO (the default)
420 | # the group names will appear in their defined order.
421 |
422 | SORT_GROUP_NAMES = YES
423 |
424 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
425 | # sorted by fully-qualified names, including namespaces. If set to
426 | # NO (the default), the class list will be sorted only by class name,
427 | # not including the namespace part.
428 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
429 | # Note: This option applies only to the class list, not to the
430 | # alphabetical list.
431 |
432 | SORT_BY_SCOPE_NAME = YES
433 |
434 | # The GENERATE_TODOLIST tag can be used to enable (YES) or
435 | # disable (NO) the todo list. This list is created by putting \todo
436 | # commands in the documentation.
437 |
438 | GENERATE_TODOLIST = YES
439 |
440 | # The GENERATE_TESTLIST tag can be used to enable (YES) or
441 | # disable (NO) the test list. This list is created by putting \test
442 | # commands in the documentation.
443 |
444 | GENERATE_TESTLIST = YES
445 |
446 | # The GENERATE_BUGLIST tag can be used to enable (YES) or
447 | # disable (NO) the bug list. This list is created by putting \bug
448 | # commands in the documentation.
449 |
450 | GENERATE_BUGLIST = YES
451 |
452 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
453 | # disable (NO) the deprecated list. This list is created by putting
454 | # \deprecated commands in the documentation.
455 |
456 | GENERATE_DEPRECATEDLIST = YES
457 |
458 | # The ENABLED_SECTIONS tag can be used to enable conditional
459 | # documentation sections, marked by \if sectionname ... \endif.
460 |
461 | ENABLED_SECTIONS =
462 |
463 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines
464 | # the initial value of a variable or define consists of for it to appear in
465 | # the documentation. If the initializer consists of more lines than specified
466 | # here it will be hidden. Use a value of 0 to hide initializers completely.
467 | # The appearance of the initializer of individual variables and defines in the
468 | # documentation can be controlled using \showinitializer or \hideinitializer
469 | # command in the documentation regardless of this setting.
470 |
471 | MAX_INITIALIZER_LINES = 30
472 |
473 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated
474 | # at the bottom of the documentation of classes and structs. If set to YES the
475 | # list will mention the files that were used to generate the documentation.
476 |
477 | SHOW_USED_FILES = YES
478 |
479 | # If the sources in your project are distributed over multiple directories
480 | # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
481 | # in the documentation. The default is NO.
482 |
483 | SHOW_DIRECTORIES = NO
484 |
485 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page.
486 | # This will remove the Files entry from the Quick Index and from the
487 | # Folder Tree View (if specified). The default is YES.
488 |
489 | SHOW_FILES = NO
490 |
491 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the
492 | # Namespaces page.
493 | # This will remove the Namespaces entry from the Quick Index
494 | # and from the Folder Tree View (if specified). The default is YES.
495 |
496 | SHOW_NAMESPACES = YES
497 |
498 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that
499 | # doxygen should invoke to get the current version for each file (typically from
500 | # the version control system). Doxygen will invoke the program by executing (via
501 | # popen()) the command , where is the value of
502 | # the FILE_VERSION_FILTER tag, and is the name of an input file
503 | # provided by doxygen. Whatever the program writes to standard output
504 | # is used as the file version. See the manual for examples.
505 |
506 | FILE_VERSION_FILTER =
507 |
508 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
509 | # doxygen. The layout file controls the global structure of the generated output files
510 | # in an output format independent way. The create the layout file that represents
511 | # doxygen's defaults, run doxygen with the -l option. You can optionally specify a
512 | # file name after the option, if omitted DoxygenLayout.xml will be used as the name
513 | # of the layout file.
514 |
515 | LAYOUT_FILE =
516 |
517 | #---------------------------------------------------------------------------
518 | # configuration options related to warning and progress messages
519 | #---------------------------------------------------------------------------
520 |
521 | # The QUIET tag can be used to turn on/off the messages that are generated
522 | # by doxygen. Possible values are YES and NO. If left blank NO is used.
523 |
524 | QUIET = NO
525 |
526 | # The WARNINGS tag can be used to turn on/off the warning messages that are
527 | # generated by doxygen. Possible values are YES and NO. If left blank
528 | # NO is used.
529 |
530 | WARNINGS = YES
531 |
532 | # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
533 | # for undocumented members. If EXTRACT_ALL is set to YES then this flag will
534 | # automatically be disabled.
535 |
536 | WARN_IF_UNDOCUMENTED = YES
537 |
538 | # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
539 | # potential errors in the documentation, such as not documenting some
540 | # parameters in a documented function, or documenting parameters that
541 | # don't exist or using markup commands wrongly.
542 |
543 | WARN_IF_DOC_ERROR = YES
544 |
545 | # This WARN_NO_PARAMDOC option can be abled to get warnings for
546 | # functions that are documented, but have no documentation for their parameters
547 | # or return value. If set to NO (the default) doxygen will only warn about
548 | # wrong or incomplete parameter documentation, but not about the absence of
549 | # documentation.
550 |
551 | WARN_NO_PARAMDOC = NO
552 |
553 | # The WARN_FORMAT tag determines the format of the warning messages that
554 | # doxygen can produce. The string should contain the $file, $line, and $text
555 | # tags, which will be replaced by the file and line number from which the
556 | # warning originated and the warning text. Optionally the format may contain
557 | # $version, which will be replaced by the version of the file (if it could
558 | # be obtained via FILE_VERSION_FILTER)
559 |
560 | WARN_FORMAT = "$file:$line: $text"
561 |
562 | # The WARN_LOGFILE tag can be used to specify a file to which warning
563 | # and error messages should be written. If left blank the output is written
564 | # to stderr.
565 |
566 | WARN_LOGFILE =
567 |
568 | #---------------------------------------------------------------------------
569 | # configuration options related to the input files
570 | #---------------------------------------------------------------------------
571 |
572 | # The INPUT tag can be used to specify the files and/or directories that contain
573 | # documented source files. You may enter file names like "myfile.cpp" or
574 | # directories like "/usr/src/myproject". Separate the files or directories
575 | # with spaces.
576 |
577 | INPUT = dso
578 |
579 | # This tag can be used to specify the character encoding of the source files
580 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
581 | # also the default input encoding. Doxygen uses libiconv (or the iconv built
582 | # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
583 | # the list of possible encodings.
584 |
585 | INPUT_ENCODING = UTF-8
586 |
587 | # If the value of the INPUT tag contains directories, you can use the
588 | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
589 | # and *.h) to filter out the source-files in the directories. If left
590 | # blank the following patterns are tested:
591 | # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
592 | # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
593 |
594 | FILE_PATTERNS =
595 |
596 | # The RECURSIVE tag can be used to turn specify whether or not subdirectories
597 | # should be searched for input files as well. Possible values are YES and NO.
598 | # If left blank NO is used.
599 |
600 | RECURSIVE = YES
601 |
602 | # The EXCLUDE tag can be used to specify files and/or directories that should
603 | # excluded from the INPUT source files. This way you can easily exclude a
604 | # subdirectory from a directory tree whose root is specified with the INPUT tag.
605 |
606 | EXCLUDE =
607 |
608 | # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
609 | # directories that are symbolic links (a Unix filesystem feature) are excluded
610 | # from the input.
611 |
612 | EXCLUDE_SYMLINKS = NO
613 |
614 | # If the value of the INPUT tag contains directories, you can use the
615 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
616 | # certain files from those directories. Note that the wildcards are matched
617 | # against the file with absolute path, so to exclude all test directories
618 | # for example use the pattern */test/*
619 |
620 | EXCLUDE_PATTERNS =
621 |
622 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
623 | # (namespaces, classes, functions, etc.) that should be excluded from the
624 | # output. The symbol name can be a fully qualified name, a word, or if the
625 | # wildcard * is used, a substring. Examples: ANamespace, AClass,
626 | # AClass::ANamespace, ANamespace::*Test
627 |
628 | EXCLUDE_SYMBOLS =
629 |
630 | # The EXAMPLE_PATH tag can be used to specify one or more files or
631 | # directories that contain example code fragments that are included (see
632 | # the \include command).
633 |
634 | EXAMPLE_PATH =
635 |
636 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the
637 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
638 | # and *.h) to filter out the source-files in the directories. If left
639 | # blank all files are included.
640 |
641 | EXAMPLE_PATTERNS =
642 |
643 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
644 | # searched for input files to be used with the \include or \dontinclude
645 | # commands irrespective of the value of the RECURSIVE tag.
646 | # Possible values are YES and NO. If left blank NO is used.
647 |
648 | EXAMPLE_RECURSIVE = NO
649 |
650 | # The IMAGE_PATH tag can be used to specify one or more files or
651 | # directories that contain image that are included in the documentation (see
652 | # the \image command).
653 |
654 | IMAGE_PATH =
655 |
656 | # The INPUT_FILTER tag can be used to specify a program that doxygen should
657 | # invoke to filter for each input file. Doxygen will invoke the filter program
658 | # by executing (via popen()) the command , where
659 | # is the value of the INPUT_FILTER tag, and is the name of an
660 | # input file. Doxygen will then use the output that the filter program writes
661 | # to standard output.
662 | # If FILTER_PATTERNS is specified, this tag will be
663 | # ignored.
664 |
665 | INPUT_FILTER =
666 |
667 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
668 | # basis.
669 | # Doxygen will compare the file name with each pattern and apply the
670 | # filter if there is a match.
671 | # The filters are a list of the form:
672 | # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
673 | # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
674 | # is applied to all files.
675 |
676 | FILTER_PATTERNS =
677 |
678 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
679 | # INPUT_FILTER) will be used to filter the input files when producing source
680 | # files to browse (i.e. when SOURCE_BROWSER is set to YES).
681 |
682 | FILTER_SOURCE_FILES = NO
683 |
684 | #---------------------------------------------------------------------------
685 | # configuration options related to source browsing
686 | #---------------------------------------------------------------------------
687 |
688 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will
689 | # be generated. Documented entities will be cross-referenced with these sources.
690 | # Note: To get rid of all source code in the generated output, make sure also
691 | # VERBATIM_HEADERS is set to NO.
692 |
693 | SOURCE_BROWSER = YES
694 |
695 | # Setting the INLINE_SOURCES tag to YES will include the body
696 | # of functions and classes directly in the documentation.
697 |
698 | INLINE_SOURCES = YES
699 |
700 | # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
701 | # doxygen to hide any special comment blocks from generated source code
702 | # fragments. Normal C and C++ comments will always remain visible.
703 |
704 | STRIP_CODE_COMMENTS = YES
705 |
706 | # If the REFERENCED_BY_RELATION tag is set to YES
707 | # then for each documented function all documented
708 | # functions referencing it will be listed.
709 |
710 | REFERENCED_BY_RELATION = YES
711 |
712 | # If the REFERENCES_RELATION tag is set to YES
713 | # then for each documented function all documented entities
714 | # called/used by that function will be listed.
715 |
716 | REFERENCES_RELATION = YES
717 |
718 | # If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
719 | # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
720 | # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
721 | # link to the source code.
722 | # Otherwise they will link to the documentation.
723 |
724 | REFERENCES_LINK_SOURCE = YES
725 |
726 | # If the USE_HTAGS tag is set to YES then the references to source code
727 | # will point to the HTML generated by the htags(1) tool instead of doxygen
728 | # built-in source browser. The htags tool is part of GNU's global source
729 | # tagging system (see http://www.gnu.org/software/global/global.html). You
730 | # will need version 4.8.6 or higher.
731 |
732 | USE_HTAGS = YES
733 |
734 | # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
735 | # will generate a verbatim copy of the header file for each class for
736 | # which an include is specified. Set to NO to disable this.
737 |
738 | VERBATIM_HEADERS = YES
739 |
740 | #---------------------------------------------------------------------------
741 | # configuration options related to the alphabetical class index
742 | #---------------------------------------------------------------------------
743 |
744 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
745 | # of all compounds will be generated. Enable this if the project
746 | # contains a lot of classes, structs, unions or interfaces.
747 |
748 | ALPHABETICAL_INDEX = YES
749 |
750 | # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
751 | # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
752 | # in which this list will be split (can be a number in the range [1..20])
753 |
754 | COLS_IN_ALPHA_INDEX = 5
755 |
756 | # In case all classes in a project start with a common prefix, all
757 | # classes will be put under the same header in the alphabetical index.
758 | # The IGNORE_PREFIX tag can be used to specify one or more prefixes that
759 | # should be ignored while generating the index headers.
760 |
761 | IGNORE_PREFIX =
762 |
763 | #---------------------------------------------------------------------------
764 | # configuration options related to the HTML output
765 | #---------------------------------------------------------------------------
766 |
767 | # If the GENERATE_HTML tag is set to YES (the default) Doxygen will
768 | # generate HTML output.
769 |
770 | GENERATE_HTML = YES
771 |
772 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
773 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
774 | # put in front of it. If left blank `html' will be used as the default path.
775 |
776 | HTML_OUTPUT = html
777 |
778 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for
779 | # each generated HTML page (for example: .htm,.php,.asp). If it is left blank
780 | # doxygen will generate files with .html extension.
781 |
782 | HTML_FILE_EXTENSION = .html
783 |
784 | # The HTML_HEADER tag can be used to specify a personal HTML header for
785 | # each generated HTML page. If it is left blank doxygen will generate a
786 | # standard header.
787 |
788 | HTML_HEADER =
789 |
790 | # The HTML_FOOTER tag can be used to specify a personal HTML footer for
791 | # each generated HTML page. If it is left blank doxygen will generate a
792 | # standard footer.
793 |
794 | HTML_FOOTER =
795 |
796 | # If the HTML_TIMESTAMP tag is set to YES then the generated HTML
797 | # documentation will contain the timesstamp.
798 |
799 | HTML_TIMESTAMP = YES
800 |
801 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
802 | # style sheet that is used by each HTML page. It can be used to
803 | # fine-tune the look of the HTML output. If the tag is left blank doxygen
804 | # will generate a default style sheet. Note that doxygen will try to copy
805 | # the style sheet file to the HTML output directory, so don't put your own
806 | # stylesheet in the HTML output directory as well, or it will be erased!
807 |
808 | HTML_STYLESHEET =
809 |
810 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
811 | # page will contain the date and time when the page was generated. Setting
812 | # this to NO can help when comparing the output of multiple runs.
813 |
814 |
815 | # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
816 | # files or namespaces will be aligned in HTML using tables. If set to
817 | # NO a bullet list will be used.
818 |
819 | HTML_ALIGN_MEMBERS = YES
820 |
821 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
822 | # documentation will contain sections that can be hidden and shown after the
823 | # page has loaded. For this to work a browser that supports
824 | # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
825 | # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
826 |
827 | HTML_DYNAMIC_SECTIONS = YES
828 |
829 | # If the GENERATE_DOCSET tag is set to YES, additional index files
830 | # will be generated that can be used as input for Apple's Xcode 3
831 | # integrated development environment, introduced with OSX 10.5 (Leopard).
832 | # To create a documentation set, doxygen will generate a Makefile in the
833 | # HTML output directory. Running make will produce the docset in that
834 | # directory and running "make install" will install the docset in
835 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
836 | # it at startup.
837 | # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
838 |
839 | GENERATE_DOCSET = NO
840 |
841 | # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
842 | # feed. A documentation feed provides an umbrella under which multiple
843 | # documentation sets from a single provider (such as a company or product suite)
844 | # can be grouped.
845 |
846 | DOCSET_FEEDNAME = Classes Cielo
847 |
848 | # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
849 | # should uniquely identify the documentation set bundle. This should be a
850 | # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
851 | # will append .docset to the name.
852 |
853 | DOCSET_BUNDLE_ID = org.doxygen.Project
854 |
855 | # If the GENERATE_HTMLHELP tag is set to YES, additional index files
856 | # will be generated that can be used as input for tools like the
857 | # Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
858 | # of the generated HTML documentation.
859 |
860 | GENERATE_HTMLHELP = NO
861 |
862 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
863 | # be used to specify the file name of the resulting .chm file. You
864 | # can add a path in front of the file if the result should not be
865 | # written to the html output directory.
866 |
867 | CHM_FILE =
868 |
869 | # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
870 | # be used to specify the location (absolute path including file name) of
871 | # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
872 | # the HTML help compiler on the generated index.hhp.
873 |
874 | HHC_LOCATION =
875 |
876 | # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
877 | # controls if a separate .chi index file is generated (YES) or that
878 | # it should be included in the master .chm file (NO).
879 |
880 | GENERATE_CHI = NO
881 |
882 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
883 | # is used to encode HtmlHelp index (hhk), content (hhc) and project file
884 | # content.
885 |
886 | CHM_INDEX_ENCODING =
887 |
888 | # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
889 | # controls whether a binary table of contents is generated (YES) or a
890 | # normal table of contents (NO) in the .chm file.
891 |
892 | BINARY_TOC = NO
893 |
894 | # The TOC_EXPAND flag can be set to YES to add extra items for group members
895 | # to the contents of the HTML help documentation and to the tree view.
896 |
897 | TOC_EXPAND = NO
898 |
899 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
900 | # are set, an additional index file will be generated that can be used as input for
901 | # Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
902 | # HTML documentation.
903 |
904 | GENERATE_QHP = NO
905 |
906 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can
907 | # be used to specify the file name of the resulting .qch file.
908 | # The path specified is relative to the HTML output folder.
909 |
910 | QCH_FILE =
911 |
912 | # The QHP_NAMESPACE tag specifies the namespace to use when generating
913 | # Qt Help Project output. For more information please see
914 | # http://doc.trolltech.com/qthelpproject.html#namespace
915 |
916 | QHP_NAMESPACE = org.doxygen.Project
917 |
918 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
919 | # Qt Help Project output. For more information please see
920 | # http://doc.trolltech.com/qthelpproject.html#virtual-folders
921 |
922 | QHP_VIRTUAL_FOLDER = doc
923 |
924 | # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
925 | # For more information please see
926 | # http://doc.trolltech.com/qthelpproject.html#custom-filters
927 |
928 | QHP_CUST_FILTER_NAME =
929 |
930 | # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
931 | # Qt Help Project / Custom Filters.
932 |
933 | QHP_CUST_FILTER_ATTRS =
934 |
935 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
936 | # filter section matches.
937 | # Qt Help Project / Filter Attributes.
938 |
939 | QHP_SECT_FILTER_ATTRS =
940 |
941 | # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
942 | # be used to specify the location of Qt's qhelpgenerator.
943 | # If non-empty doxygen will try to run qhelpgenerator on the generated
944 | # .qhp file.
945 |
946 | QHG_LOCATION =
947 |
948 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
949 | # will be generated, which together with the HTML files, form an Eclipse help
950 | # plugin. To install this plugin and make it available under the help contents
951 | # menu in Eclipse, the contents of the directory containing the HTML and XML
952 | # files needs to be copied into the plugins directory of eclipse. The name of
953 | # the directory within the plugins directory should be the same as
954 | # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the help appears.
955 |
956 | GENERATE_ECLIPSEHELP = YES
957 |
958 | # A unique identifier for the eclipse help plugin. When installing the plugin
959 | # the directory name containing the HTML and XML files should also have
960 | # this name.
961 |
962 | ECLIPSE_DOC_ID = org.doxygen.Project
963 |
964 | # The DISABLE_INDEX tag can be used to turn on/off the condensed index at
965 | # top of each HTML page. The value NO (the default) enables the index and
966 | # the value YES disables it.
967 |
968 | DISABLE_INDEX = NO
969 |
970 | # This tag can be used to set the number of enum values (range [1..20])
971 | # that doxygen will group on one line in the generated HTML documentation.
972 |
973 | ENUM_VALUES_PER_LINE = 4
974 |
975 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
976 | # structure should be generated to display hierarchical information.
977 | # If the tag value is set to YES, a side panel will be generated
978 | # containing a tree-like index structure (just like the one that
979 | # is generated for HTML Help). For this to work a browser that supports
980 | # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
981 | # Windows users are probably better off using the HTML help feature.
982 |
983 | GENERATE_TREEVIEW = YES
984 |
985 | # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
986 | # and Class Hierarchy pages using a tree view instead of an ordered list.
987 |
988 | USE_INLINE_TREES = NO
989 |
990 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
991 | # used to set the initial width (in pixels) of the frame in which the tree
992 | # is shown.
993 |
994 | TREEVIEW_WIDTH = 250
995 |
996 | # Use this tag to change the font size of Latex formulas included
997 | # as images in the HTML documentation. The default is 10. Note that
998 | # when you change the font size after a successful doxygen run you need
999 | # to manually remove any form_*.png images from the HTML output directory
1000 | # to force them to be regenerated.
1001 |
1002 | FORMULA_FONTSIZE = 10
1003 |
1004 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript
1005 | # and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) there is already a search function so this one should
1006 | # typically be disabled. For large projects the javascript based search engine
1007 | # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
1008 |
1009 | SEARCHENGINE = YES
1010 |
1011 | # When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index
1012 | # file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup
1013 | # and does not have live searching capabilities.
1014 |
1015 | SERVER_BASED_SEARCH = YES
1016 |
1017 | #---------------------------------------------------------------------------
1018 | # configuration options related to the LaTeX output
1019 | #---------------------------------------------------------------------------
1020 |
1021 | # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
1022 | # generate Latex output.
1023 |
1024 | GENERATE_LATEX = NO
1025 |
1026 | # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
1027 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1028 | # put in front of it. If left blank `latex' will be used as the default path.
1029 |
1030 | LATEX_OUTPUT = latex
1031 |
1032 | # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1033 | # invoked. If left blank `latex' will be used as the default command name.
1034 | # Note that when enabling USE_PDFLATEX this option is only used for
1035 | # generating bitmaps for formulas in the HTML output, but not in the
1036 | # Makefile that is written to the output directory.
1037 |
1038 | LATEX_CMD_NAME = latex
1039 |
1040 | # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
1041 | # generate index for LaTeX. If left blank `makeindex' will be used as the
1042 | # default command name.
1043 |
1044 | MAKEINDEX_CMD_NAME = makeindex
1045 |
1046 | # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
1047 | # LaTeX documents. This may be useful for small projects and may help to
1048 | # save some trees in general.
1049 |
1050 | COMPACT_LATEX = NO
1051 |
1052 | # The PAPER_TYPE tag can be used to set the paper type that is used
1053 | # by the printer. Possible values are: a4, a4wide, letter, legal and
1054 | # executive. If left blank a4wide will be used.
1055 |
1056 | PAPER_TYPE = a4wide
1057 |
1058 | # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
1059 | # packages that should be included in the LaTeX output.
1060 |
1061 | EXTRA_PACKAGES =
1062 |
1063 | # The LATEX_HEADER tag can be used to specify a personal LaTeX header for
1064 | # the generated latex document. The header should contain everything until
1065 | # the first chapter. If it is left blank doxygen will generate a
1066 | # standard header. Notice: only use this tag if you know what you are doing!
1067 |
1068 | LATEX_HEADER =
1069 |
1070 | # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
1071 | # is prepared for conversion to pdf (using ps2pdf). The pdf file will
1072 | # contain links (just like the HTML output) instead of page references
1073 | # This makes the output suitable for online browsing using a pdf viewer.
1074 |
1075 | PDF_HYPERLINKS = YES
1076 |
1077 | # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
1078 | # plain latex in the generated Makefile. Set this option to YES to get a
1079 | # higher quality PDF documentation.
1080 |
1081 | USE_PDFLATEX = YES
1082 |
1083 | # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
1084 | # command to the generated LaTeX files. This will instruct LaTeX to keep
1085 | # running if errors occur, instead of asking the user for help.
1086 | # This option is also used when generating formulas in HTML.
1087 |
1088 | LATEX_BATCHMODE = NO
1089 |
1090 | # If LATEX_HIDE_INDICES is set to YES then doxygen will not
1091 | # include the index chapters (such as File Index, Compound Index, etc.)
1092 | # in the output.
1093 |
1094 | LATEX_HIDE_INDICES = NO
1095 |
1096 | # If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
1097 |
1098 | LATEX_SOURCE_CODE = NO
1099 |
1100 | #---------------------------------------------------------------------------
1101 | # configuration options related to the RTF output
1102 | #---------------------------------------------------------------------------
1103 |
1104 | # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
1105 | # The RTF output is optimized for Word 97 and may not look very pretty with
1106 | # other RTF readers or editors.
1107 |
1108 | GENERATE_RTF = NO
1109 |
1110 | # The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
1111 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1112 | # put in front of it. If left blank `rtf' will be used as the default path.
1113 |
1114 | RTF_OUTPUT = rtf
1115 |
1116 | # If the COMPACT_RTF tag is set to YES Doxygen generates more compact
1117 | # RTF documents. This may be useful for small projects and may help to
1118 | # save some trees in general.
1119 |
1120 | COMPACT_RTF = NO
1121 |
1122 | # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
1123 | # will contain hyperlink fields. The RTF file will
1124 | # contain links (just like the HTML output) instead of page references.
1125 | # This makes the output suitable for online browsing using WORD or other
1126 | # programs which support those fields.
1127 | # Note: wordpad (write) and others do not support links.
1128 |
1129 | RTF_HYPERLINKS = NO
1130 |
1131 | # Load stylesheet definitions from file. Syntax is similar to doxygen's
1132 | # config file, i.e. a series of assignments. You only have to provide
1133 | # replacements, missing definitions are set to their default value.
1134 |
1135 | RTF_STYLESHEET_FILE =
1136 |
1137 | # Set optional variables used in the generation of an rtf document.
1138 | # Syntax is similar to doxygen's config file.
1139 |
1140 | RTF_EXTENSIONS_FILE =
1141 |
1142 | #---------------------------------------------------------------------------
1143 | # configuration options related to the man page output
1144 | #---------------------------------------------------------------------------
1145 |
1146 | # If the GENERATE_MAN tag is set to YES (the default) Doxygen will
1147 | # generate man pages
1148 |
1149 | GENERATE_MAN = NO
1150 |
1151 | # The MAN_OUTPUT tag is used to specify where the man pages will be put.
1152 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1153 | # put in front of it. If left blank `man' will be used as the default path.
1154 |
1155 | MAN_OUTPUT = man
1156 |
1157 | # The MAN_EXTENSION tag determines the extension that is added to
1158 | # the generated man pages (default is the subroutine's section .3)
1159 |
1160 | MAN_EXTENSION = .3
1161 |
1162 | # If the MAN_LINKS tag is set to YES and Doxygen generates man output,
1163 | # then it will generate one additional man file for each entity
1164 | # documented in the real man page(s). These additional files
1165 | # only source the real man page, but without them the man command
1166 | # would be unable to find the correct page. The default is NO.
1167 |
1168 | MAN_LINKS = NO
1169 |
1170 | #---------------------------------------------------------------------------
1171 | # configuration options related to the XML output
1172 | #---------------------------------------------------------------------------
1173 |
1174 | # If the GENERATE_XML tag is set to YES Doxygen will
1175 | # generate an XML file that captures the structure of
1176 | # the code including all documentation.
1177 |
1178 | GENERATE_XML = NO
1179 |
1180 | # The XML_OUTPUT tag is used to specify where the XML pages will be put.
1181 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1182 | # put in front of it. If left blank `xml' will be used as the default path.
1183 |
1184 | XML_OUTPUT = xml
1185 |
1186 | # The XML_SCHEMA tag can be used to specify an XML schema,
1187 | # which can be used by a validating XML parser to check the
1188 | # syntax of the XML files.
1189 |
1190 | XML_SCHEMA =
1191 |
1192 | # The XML_DTD tag can be used to specify an XML DTD,
1193 | # which can be used by a validating XML parser to check the
1194 | # syntax of the XML files.
1195 |
1196 | XML_DTD =
1197 |
1198 | # If the XML_PROGRAMLISTING tag is set to YES Doxygen will
1199 | # dump the program listings (including syntax highlighting
1200 | # and cross-referencing information) to the XML output. Note that
1201 | # enabling this will significantly increase the size of the XML output.
1202 |
1203 | XML_PROGRAMLISTING = YES
1204 |
1205 | #---------------------------------------------------------------------------
1206 | # configuration options for the AutoGen Definitions output
1207 | #---------------------------------------------------------------------------
1208 |
1209 | # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
1210 | # generate an AutoGen Definitions (see autogen.sf.net) file
1211 | # that captures the structure of the code including all
1212 | # documentation. Note that this feature is still experimental
1213 | # and incomplete at the moment.
1214 |
1215 | GENERATE_AUTOGEN_DEF = YES
1216 |
1217 | #---------------------------------------------------------------------------
1218 | # configuration options related to the Perl module output
1219 | #---------------------------------------------------------------------------
1220 |
1221 | # If the GENERATE_PERLMOD tag is set to YES Doxygen will
1222 | # generate a Perl module file that captures the structure of
1223 | # the code including all documentation. Note that this
1224 | # feature is still experimental and incomplete at the
1225 | # moment.
1226 |
1227 | GENERATE_PERLMOD = NO
1228 |
1229 | # If the PERLMOD_LATEX tag is set to YES Doxygen will generate
1230 | # the necessary Makefile rules, Perl scripts and LaTeX code to be able
1231 | # to generate PDF and DVI output from the Perl module output.
1232 |
1233 | PERLMOD_LATEX = NO
1234 |
1235 | # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
1236 | # nicely formatted so it can be parsed by a human reader.
1237 | # This is useful
1238 | # if you want to understand what is going on.
1239 | # On the other hand, if this
1240 | # tag is set to NO the size of the Perl module output will be much smaller
1241 | # and Perl will parse it just the same.
1242 |
1243 | PERLMOD_PRETTY = YES
1244 |
1245 | # The names of the make variables in the generated doxyrules.make file
1246 | # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
1247 | # This is useful so different doxyrules.make files included by the same
1248 | # Makefile don't overwrite each other's variables.
1249 |
1250 | PERLMOD_MAKEVAR_PREFIX =
1251 |
1252 | #---------------------------------------------------------------------------
1253 | # Configuration options related to the preprocessor
1254 | #---------------------------------------------------------------------------
1255 |
1256 | # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
1257 | # evaluate all C-preprocessor directives found in the sources and include
1258 | # files.
1259 |
1260 | ENABLE_PREPROCESSING = YES
1261 |
1262 | # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
1263 | # names in the source code. If set to NO (the default) only conditional
1264 | # compilation will be performed. Macro expansion can be done in a controlled
1265 | # way by setting EXPAND_ONLY_PREDEF to YES.
1266 |
1267 | MACRO_EXPANSION = NO
1268 |
1269 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
1270 | # then the macro expansion is limited to the macros specified with the
1271 | # PREDEFINED and EXPAND_AS_DEFINED tags.
1272 |
1273 | EXPAND_ONLY_PREDEF = NO
1274 |
1275 | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
1276 | # in the INCLUDE_PATH (see below) will be search if a #include is found.
1277 |
1278 | SEARCH_INCLUDES = YES
1279 |
1280 | # The INCLUDE_PATH tag can be used to specify one or more directories that
1281 | # contain include files that are not input files but should be processed by
1282 | # the preprocessor.
1283 |
1284 | INCLUDE_PATH =
1285 |
1286 | # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
1287 | # patterns (like *.h and *.hpp) to filter out the header-files in the
1288 | # directories. If left blank, the patterns specified with FILE_PATTERNS will
1289 | # be used.
1290 |
1291 | INCLUDE_FILE_PATTERNS =
1292 |
1293 | # The PREDEFINED tag can be used to specify one or more macro names that
1294 | # are defined before the preprocessor is started (similar to the -D option of
1295 | # gcc). The argument of the tag is a list of macros of the form: name
1296 | # or name=definition (no spaces). If the definition and the = are
1297 | # omitted =1 is assumed. To prevent a macro definition from being
1298 | # undefined via #undef or recursively expanded use the := operator
1299 | # instead of the = operator.
1300 |
1301 | PREDEFINED =
1302 |
1303 | # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
1304 | # this tag can be used to specify a list of macro names that should be expanded.
1305 | # The macro definition that is found in the sources will be used.
1306 | # Use the PREDEFINED tag if you want to use a different macro definition.
1307 |
1308 | EXPAND_AS_DEFINED =
1309 |
1310 | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
1311 | # doxygen's preprocessor will remove all function-like macros that are alone
1312 | # on a line, have an all uppercase name, and do not end with a semicolon. Such
1313 | # function macros are typically used for boiler-plate code, and will confuse
1314 | # the parser if not removed.
1315 |
1316 | SKIP_FUNCTION_MACROS = YES
1317 |
1318 | #---------------------------------------------------------------------------
1319 | # Configuration::additions related to external references
1320 | #---------------------------------------------------------------------------
1321 |
1322 | # The TAGFILES option can be used to specify one or more tagfiles.
1323 | # Optionally an initial location of the external documentation
1324 | # can be added for each tagfile. The format of a tag file without
1325 | # this location is as follows:
1326 | #
1327 | # TAGFILES = file1 file2 ...
1328 | # Adding location for the tag files is done as follows:
1329 | #
1330 | # TAGFILES = file1=loc1 "file2 = loc2" ...
1331 | # where "loc1" and "loc2" can be relative or absolute paths or
1332 | # URLs. If a location is present for each tag, the installdox tool
1333 | # does not have to be run to correct the links.
1334 | # Note that each tag file must have a unique name
1335 | # (where the name does NOT include the path)
1336 | # If a tag file is not located in the directory in which doxygen
1337 | # is run, you must also specify the path to the tagfile here.
1338 |
1339 | TAGFILES =
1340 |
1341 | # When a file name is specified after GENERATE_TAGFILE, doxygen will create
1342 | # a tag file that is based on the input files it reads.
1343 |
1344 | GENERATE_TAGFILE =
1345 |
1346 | # If the ALLEXTERNALS tag is set to YES all external classes will be listed
1347 | # in the class index. If set to NO only the inherited external classes
1348 | # will be listed.
1349 |
1350 | ALLEXTERNALS = NO
1351 |
1352 | # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
1353 | # in the modules index. If set to NO, only the current project's groups will
1354 | # be listed.
1355 |
1356 | EXTERNAL_GROUPS = YES
1357 |
1358 | # The PERL_PATH should be the absolute path and name of the perl script
1359 | # interpreter (i.e. the result of `which perl').
1360 |
1361 | PERL_PATH = /usr/bin/perl
1362 |
1363 | #---------------------------------------------------------------------------
1364 | # Configuration options related to the dot tool
1365 | #---------------------------------------------------------------------------
1366 |
1367 | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
1368 | # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
1369 | # or super classes. Setting the tag to NO turns the diagrams off. Note that
1370 | # this option is superseded by the HAVE_DOT option below. This is only a
1371 | # fallback. It is recommended to install and use dot, since it yields more
1372 | # powerful graphs.
1373 |
1374 | CLASS_DIAGRAMS = YES
1375 |
1376 | # You can define message sequence charts within doxygen comments using the \msc
1377 | # command. Doxygen will then run the mscgen tool (see
1378 | # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
1379 | # documentation. The MSCGEN_PATH tag allows you to specify the directory where
1380 | # the mscgen tool resides. If left empty the tool is assumed to be found in the
1381 | # default search path.
1382 |
1383 | MSCGEN_PATH = /usr/local/bin/mscgen
1384 |
1385 | # If set to YES, the inheritance and collaboration graphs will hide
1386 | # inheritance and usage relations if the target is undocumented
1387 | # or is not a class.
1388 |
1389 | HIDE_UNDOC_RELATIONS = YES
1390 |
1391 | # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
1392 | # available from the path. This tool is part of Graphviz, a graph visualization
1393 | # toolkit from AT&T and Lucent Bell Labs. The other options in this section
1394 | # have no effect if this option is set to NO (the default)
1395 |
1396 | HAVE_DOT = YES
1397 |
1398 | # By default doxygen will write a font called FreeSans.ttf to the output
1399 | # directory and reference it in all dot files that doxygen generates. This
1400 | # font does not include all possible unicode characters however, so when you need
1401 | # these (or just want a differently looking font) you can specify the font name
1402 | # using DOT_FONTNAME. You need need to make sure dot is able to find the font,
1403 | # which can be done by putting it in a standard location or by setting the
1404 | # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
1405 | # containing the font.
1406 |
1407 | DOT_FONTNAME = FreeSans
1408 |
1409 | # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
1410 | # The default size is 10pt.
1411 |
1412 | DOT_FONTSIZE = 10
1413 |
1414 | # By default doxygen will tell dot to use the output directory to look for the
1415 | # FreeSans.ttf font (which doxygen will put there itself). If you specify a
1416 | # different font using DOT_FONTNAME you can set the path where dot
1417 | # can find it using this tag.
1418 |
1419 | DOT_FONTPATH =
1420 |
1421 | # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
1422 | # will generate a graph for each documented class showing the direct and
1423 | # indirect inheritance relations. Setting this tag to YES will force the
1424 | # the CLASS_DIAGRAMS tag to NO.
1425 |
1426 | CLASS_GRAPH = YES
1427 |
1428 | # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
1429 | # will generate a graph for each documented class showing the direct and
1430 | # indirect implementation dependencies (inheritance, containment, and
1431 | # class references variables) of the class with other documented classes.
1432 |
1433 | COLLABORATION_GRAPH = YES
1434 |
1435 | # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
1436 | # will generate a graph for groups, showing the direct groups dependencies
1437 |
1438 | GROUP_GRAPHS = YES
1439 |
1440 | # If the UML_LOOK tag is set to YES doxygen will generate inheritance and
1441 | # collaboration diagrams in a style similar to the OMG's Unified Modeling
1442 | # Language.
1443 |
1444 | UML_LOOK = YES
1445 |
1446 | # If set to YES, the inheritance and collaboration graphs will show the
1447 | # relations between templates and their instances.
1448 |
1449 | TEMPLATE_RELATIONS = YES
1450 |
1451 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
1452 | # tags are set to YES then doxygen will generate a graph for each documented
1453 | # file showing the direct and indirect include dependencies of the file with
1454 | # other documented files.
1455 |
1456 | INCLUDE_GRAPH = YES
1457 |
1458 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
1459 | # HAVE_DOT tags are set to YES then doxygen will generate a graph for each
1460 | # documented header file showing the documented files that directly or
1461 | # indirectly include this file.
1462 |
1463 | INCLUDED_BY_GRAPH = YES
1464 |
1465 | # If the CALL_GRAPH and HAVE_DOT options are set to YES then
1466 | # doxygen will generate a call dependency graph for every global function
1467 | # or class method. Note that enabling this option will significantly increase
1468 | # the time of a run. So in most cases it will be better to enable call graphs
1469 | # for selected functions only using the \callgraph command.
1470 |
1471 | CALL_GRAPH = YES
1472 |
1473 | # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
1474 | # doxygen will generate a caller dependency graph for every global function
1475 | # or class method. Note that enabling this option will significantly increase
1476 | # the time of a run. So in most cases it will be better to enable caller
1477 | # graphs for selected functions only using the \callergraph command.
1478 |
1479 | CALLER_GRAPH = YES
1480 |
1481 | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
1482 | # will graphical hierarchy of all classes instead of a textual one.
1483 |
1484 | GRAPHICAL_HIERARCHY = YES
1485 |
1486 | # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
1487 | # then doxygen will show the dependencies a directory has on other directories
1488 | # in a graphical way. The dependency relations are determined by the #include
1489 | # relations between the files in the directories.
1490 |
1491 | DIRECTORY_GRAPH = YES
1492 |
1493 | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
1494 | # generated by dot. Possible values are png, jpg, or gif
1495 | # If left blank png will be used.
1496 |
1497 | DOT_IMAGE_FORMAT = png
1498 |
1499 | # The tag DOT_PATH can be used to specify the path where the dot tool can be
1500 | # found. If left blank, it is assumed the dot tool can be found in the path.
1501 |
1502 | DOT_PATH =
1503 |
1504 | # The DOTFILE_DIRS tag can be used to specify one or more directories that
1505 | # contain dot files that are included in the documentation (see the
1506 | # \dotfile command).
1507 |
1508 | DOTFILE_DIRS =
1509 |
1510 | # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
1511 | # nodes that will be shown in the graph. If the number of nodes in a graph
1512 | # becomes larger than this value, doxygen will truncate the graph, which is
1513 | # visualized by representing a node as a red box. Note that doxygen if the
1514 | # number of direct children of the root node in a graph is already larger than
1515 | # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
1516 | # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
1517 |
1518 | DOT_GRAPH_MAX_NODES = 50
1519 |
1520 | # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
1521 | # graphs generated by dot. A depth value of 3 means that only nodes reachable
1522 | # from the root by following a path via at most 3 edges will be shown. Nodes
1523 | # that lay further from the root node will be omitted. Note that setting this
1524 | # option to 1 or 2 may greatly reduce the computation time needed for large
1525 | # code bases. Also note that the size of a graph can be further restricted by
1526 | # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
1527 |
1528 | MAX_DOT_GRAPH_DEPTH = 0
1529 |
1530 | # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
1531 | # background. This is disabled by default, because dot on Windows does not
1532 | # seem to support this out of the box. Warning: Depending on the platform used,
1533 | # enabling this option may lead to badly anti-aliased labels on the edges of
1534 | # a graph (i.e. they become hard to read).
1535 |
1536 | DOT_TRANSPARENT = YES
1537 |
1538 | # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
1539 | # files in one run (i.e. multiple -o and -T options on the command line). This
1540 | # makes dot run faster, but since only newer versions of dot (>1.8.10)
1541 | # support this, this feature is disabled by default.
1542 |
1543 | DOT_MULTI_TARGETS = YES
1544 |
1545 | # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
1546 | # generate a legend page explaining the meaning of the various boxes and
1547 | # arrows in the dot generated graphs.
1548 |
1549 | GENERATE_LEGEND = YES
1550 |
1551 | # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
1552 | # remove the intermediate dot files that are used to generate
1553 | # the various graphs.
1554 |
1555 | DOT_CLEANUP = YES
1556 |
--------------------------------------------------------------------------------
/dso/cielo/Cielo.php:
--------------------------------------------------------------------------------
1 | CieloMode::DEPLOYMENT Para o ambiente de testes
71 | * @li CieloMode::PRODUCTION Para o ambiente de produção
72 | * @param string $returnURL URL de retorno
73 | * @param string $affiliationCode Código de afiliação da loja
74 | * @param string $affiliationKey Chave de afiliação
75 | * @see CieloMode::DEPLOYMENT
76 | * @see CieloMode::PRODUCTION
77 | * @throws InvalidArgumentException Se o modo não for um dos especificados acima.
78 | * @throws InvalidArgumentException Se a URL de retorno for inválida.
79 | * @throws InvalidArgumentException Se o código de afiliação for inválido.
80 | * @throws InvalidArgumentException Se a chave de afiliação for inválida.
81 | */
82 | final public function __construct( $mode = CieloMode::PRODUCTION , $returnURL = null , $affiliationCode = null , $affiliationKey = null ) {
83 | switch ( $mode ) {
84 | case CieloMode::DEPLOYMENT :
85 | $this->cieloURL = 'https://qasecommerce.cielo.com.br/servicos/ecommwsec.do';
86 | break;
87 | case CieloMode::PRODUCTION :
88 | $this->cieloURL = 'https://ecommerce.cbmp.com.br/servicos/ecommwsec.do';
89 | break;
90 | default :
91 | throw new InvalidArgumentException( 'Modo inválido' );
92 | }
93 |
94 | if ( !is_null( $returnURL ) ) {
95 | $this->setReturnURL( $returnURL );
96 | }
97 |
98 | if ( !is_null( $affiliationCode ) ) {
99 | $this->setAffiliationCode( $affiliationCode );
100 | }
101 |
102 | if ( !is_null( $affiliationKey ) ) {
103 | $this->setAffiliationKey( $affiliationKey );
104 | }
105 | }
106 |
107 | /**
108 | * Recupera o XML da última requisição
109 | * @param boolean $highlight Indica se o retorno deverá ser formatado
110 | * @return string
111 | * @throws BadMethodCallException Se nenhuma transação tiver sido efetuada
112 | */
113 | public function __getLastRequest( $highlight = false ) {
114 | if ( !is_null( $this->transaction ) ) {
115 | return $this->transaction->getRequestXML( $highlight );
116 | } else {
117 | throw new BadMethodCallException( 'Nenhuma transação foi feita ainda' );
118 | }
119 | }
120 |
121 | /**
122 | * Recupera o XML da última resposta
123 | * @param boolean $highlight Indica se o retorno deverá ser formatado
124 | * @return string
125 | * @throws BadMethodCallException Se nenhuma transação tiver sido efetuada
126 | */
127 | public function __getLastResponse( $highlight = false ) {
128 | if ( !is_null( $this->transaction ) ) {
129 | return $this->transaction->getResponseXML( $highlight );
130 | } else {
131 | throw new BadMethodCallException( 'Nenhuma transação foi feita ainda' );
132 | }
133 | }
134 |
135 | /**
136 | * Define que a captura será feita automaticamente, por padrão a captura é manual.
137 | * @return Cielo
138 | */
139 | public function automaticCapture() {
140 | $this->automaticCapture = true;
141 |
142 | return $this;
143 | }
144 |
145 | /**
146 | * Cria um objeto de requisição de autorização da transacao
147 | * @param string $tid ID da transação
148 | * @param string $creditCard Tipo do cartão
149 | * @param string $cardNumber Número do cartão de crédito
150 | * @param integer $cardExpiration Data de expiração do cartão no formato yyyymm
151 | * @param integer $indicator Indicador do código de segurança
152 | * @param integer $securityCode Código de segurança do cartão
153 | * @param string $orderNumber Número identificador do pedido
154 | * @param integer $orderValue Valor do pedido
155 | * @param string $paymentProduct Forma de pagamento do pedido, pode ser uma das seguintes:
156 | * @li PaymentMethod::ONE_TIME_PAYMENT - 1 - Crédito à Vista
157 | * @li PaymentMethod::INSTALLMENTS_BY_AFFILIATED_MERCHANTS - 2 - Parcelado pela loja
158 | * @li PaymentMethod::INSTALLMENTS_BY_CARD_ISSUERS - 3 - Parcelado pela administradora
159 | * @li PaymentMethod::DEBIT - A - Débito
160 | * @param $parcels integer Número de parcelas do pedido.
161 | * @attention Se $formaPagamento for 1 (Crédito à Vista) ou A (Débito), $parcelas precisa, necessariamente
162 | * ser igual a 1
163 | * @param string $freeField Um valor qualquer que poderá ser enviado à Cielo para ser resgatado posteriormente
164 | * @return AuthorizationRequest
165 | * @throws UnexpectedValueException Se $formaPagamento for 1 (Crédito à Vista) ou A (Débito) e o número de parcelas
166 | * for diferente de 1
167 | */
168 | final public function buildAuthorizationRequest( $tid , $creditCard , $cardNumber , $cardExpiration , $indicator , $securityCode , $orderNumber , $orderValue , $paymentProduct , $parcels = 1 , $freeField = null ) {
169 | if ( ( ( $paymentProduct == PaymentProduct::ONE_TIME_PAYMENT ) || ( $paymentProduct == PaymentProduct::DEBIT ) ) && ( $parcels != 1 ) ) {
170 | throw new UnexpectedValueException( 'Quando a forma de pagamento é Crédito à vista ou Débito, o número de parcelas deve ser 1' );
171 | } else {
172 | if ( $creditCard == CreditCard::MASTER_CARD && $indicator != 1 ) {
173 | throw new UnexpectedValueException( 'Quando o cartão é MasterCard, o indicador deve ser 1' );
174 | }
175 |
176 | if ( $indicator == 1 && !preg_match( '/^[0-9]{3}$/' , (string) $securityCode ) ){
177 | throw new UnexpectedValueException( 'Quando o indicador de segurança é 1, o código de segurança deve ser informado' );
178 | }
179 |
180 | if ( is_int( $orderValue ) || is_float( $orderValue ) ) {
181 | $this->transaction = new AuthorizationRequest( $this->getHTTPRequester() );
182 | $this->transaction->addNode( new EcDataNode( $this->getAffiliationCode() , $this->getAffiliationKey() ) );
183 | $this->transaction->addNode( new CardDataNode( $cardNumber , $cardExpiration , $indicator , $securityCode ) );
184 | $this->transaction->addNode( new OrderDataNode( $orderNumber , $orderValue ) );
185 | $this->transaction->addNode( new PaymentMethodNode( $paymentProduct , $parcels , $creditCard ) );
186 | $this->transaction->setCapture( $this->automaticCapture );
187 | $this->transaction->setURL( $this->cieloURL );
188 | $this->transaction->setTID( $tid );
189 |
190 | if ( !is_null( $freeField ) ) {
191 | $this->transaction->setFreeField( $freeField );
192 | }
193 |
194 | return $this->transaction;
195 | } else {
196 | throw new UnexpectedValueException( sprintf( 'O valor do pedido deve ser numérico, %s foi dado.' , gettype( $orderValue ) ) );
197 | }
198 | }
199 | }
200 |
201 | /**
202 | * @brief Cria um objeto de requisição de cancelamento de transacao
203 | * @details Constroi o objeto de transação a partir de uma consulta para cancelamento, utilizando o TID (Transaction ID).
204 | * @param string $tid TID da transação que será utilizado para fazer a consulta
205 | * @return CancellationRequest
206 | */
207 | final public function buildCancellationTransaction( $tid ) {
208 | $this->transaction = new CancellationRequest( $this->getHTTPRequester() );
209 | $this->transaction->addNode( new EcDataNode( $this->getAffiliationCode() , $this->getAffiliationKey() ) );
210 | $this->transaction->setTID( $tid );
211 | $this->transaction->setURL( $this->cieloURL );
212 |
213 | return $this->transaction;
214 | }
215 |
216 | /**
217 | * @brief Cria um objeto Transacao
218 | * @details Constroi o objeto de transação a partir de uma captura, utilizando o TID (Transaction ID).
219 | * @param string $tid TID da transação que será utilizado para fazer a captura
220 | * @param float $value Valor que será capturado
221 | * @return CaptureRequest
222 | * @throws InvalidArgumentException Se o valor for definido mas não for numérico
223 | */
224 | final public function buildCaptureTransaction( $tid , $value = null ) {
225 | $nullValue = is_null( $value );
226 |
227 | if ( $nullValue || is_float( $value ) || is_int( $value ) ) {
228 | $this->transaction = new CaptureRequest( $this->getHTTPRequester() );
229 | $this->transaction->addNode( new EcDataNode( $this->getAffiliationCode() , $this->getAffiliationKey() ) );
230 | $this->transaction->setTID( $tid );
231 | $this->transaction->setURL( $this->cieloURL );
232 |
233 | if ( !$nullValue ) {
234 | $this->transaction->setValue( $value );
235 | }
236 |
237 | return $this->transaction;
238 | } else {
239 | throw new InvalidArgumentException( sprintf( 'O valor deve ser um inteiro ou float, %s foi dado' , gettype( $value ) ) );
240 | }
241 | }
242 |
243 | /**
244 | * @brief Cria um objeto Transacao
245 | * @details Constroi o objeto de transação a partir de uma consulta, utilizando o TID (Transaction ID).
246 | * @param string $tid TID da transação que será utilizado para fazer a consulta
247 | * @return QueryRequest
248 | */
249 | final public function buildQueryTransaction( $tid ) {
250 | $this->transaction = new QueryRequest( $this->getHTTPRequester() );
251 | $this->transaction->addNode( new EcDataNode( $this->getAffiliationCode() , $this->getAffiliationKey() ) );
252 | $this->transaction->setTID( $tid );
253 | $this->transaction->setURL( $this->cieloURL );
254 |
255 | return $this->transaction;
256 | }
257 |
258 | /**
259 | * @brief Cria um objeto de requisição de TID
260 | * @param string $creditCard Tipo do cartão
261 | * @param string $paymentProduct Forma de pagamento do pedido, pode ser uma das seguintes:
262 | * @li PaymentMethod::ONE_TIME_PAYMENT - 1 - Crédito à Vista
263 | * @li PaymentMethod::INSTALLMENTS_BY_AFFILIATED_MERCHANTS - 2 - Parcelado pela loja
264 | * @li PaymentMethod::INSTALLMENTS_BY_CARD_ISSUERS - 3 - Parcelado pela administradora
265 | * @li PaymentMethod::DEBIT - A - Débito
266 | * @param $parcels integer Número de parcelas do pedido.
267 | * @attention Se $formaPagamento for 1 (Crédito à Vista) ou A (Débito), $parcelas precisa, necessariamente
268 | * ser igual a 1
269 | * @return TIDRequest
270 | * @throws UnexpectedValueException Se $formaPagamento for 1 (Crédito à Vista) ou A (Débito) e o número de parcelas
271 | * for diferente de 1
272 | */
273 | final public function buildTIDRequest( $creditCard , $paymentProduct , $parcels = 1 ) {
274 | if ( ( ( $paymentProduct == PaymentProduct::ONE_TIME_PAYMENT ) || ( $paymentProduct == PaymentProduct::DEBIT ) ) && ( $parcels != 1 ) ) {
275 | throw new UnexpectedValueException( 'Quando a forma de pagamento é Crédito à vista ou Débito, o número de parcelas deve ser 1' );
276 | } else {
277 | $this->transaction = new TIDRequest( $this->getHTTPRequester() );
278 | $this->transaction->addNode( new EcDataNode( $this->getAffiliationCode() , $this->getAffiliationKey() ) );
279 | $this->transaction->addNode( new PaymentMethodNode( $paymentProduct , $parcels , $creditCard ) );
280 | $this->transaction->setURL( $this->cieloURL );
281 |
282 | return $this->transaction;
283 | }
284 | }
285 |
286 | /**
287 | * @brief Cria um objeto de requisição de transacao
288 | * @details Constroi um objeto de requisição de transação para autenticação
289 | * @param string $creditCard Tipo do cartão
290 | * @param string $orderNumber Número identificador do pedido
291 | * @param integer $orderValue Valor do pedido
292 | * @param string $paymentProduct Forma de pagamento do pedido, pode ser uma das seguintes:
293 | * @li PaymentMethod::ONE_TIME_PAYMENT - 1 - Crédito à Vista
294 | * @li PaymentMethod::INSTALLMENTS_BY_AFFILIATED_MERCHANTS - 2 - Parcelado pela loja
295 | * @li PaymentMethod::INSTALLMENTS_BY_CARD_ISSUERS - 3 - Parcelado pela administradora
296 | * @li PaymentMethod::DEBIT - A - Débito
297 | * @param $parcels integer Número de parcelas do pedido.
298 | * @attention Se $formaPagamento for 1 (Crédito à Vista) ou A (Débito), $parcelas precisa, necessariamente
299 | * ser igual a 1
300 | * @param string $freeField Um valor qualquer que poderá ser enviado à Cielo para ser resgatado posteriormente
301 | * @return TransactionRequest
302 | * @throws UnexpectedValueException Se $formaPagamento for 1 (Crédito à Vista) ou A (Débito) e o número de parcelas
303 | * for diferente de 1
304 | */
305 | final public function buildTransactionRequest( $creditCard , $orderNumber , $orderValue , $paymentProduct , $parcels = 1 , $freeField = null ) {
306 | if ( ( ( $paymentProduct == PaymentProduct::ONE_TIME_PAYMENT ) || ( $paymentProduct == PaymentProduct::DEBIT ) ) && ( $parcels != 1 ) ) {
307 | throw new UnexpectedValueException( 'Quando a forma de pagamento é Crédito à vista ou Débito, o número de parcelas deve ser 1' );
308 | } else {
309 | if ( is_int( $orderValue ) || is_float( $orderValue ) ) {
310 | $this->transaction = new TransactionRequest( $this->getHTTPRequester() );
311 | $this->transaction->addNode( new EcDataNode( $this->getAffiliationCode() , $this->getAffiliationKey() ) );
312 | $this->transaction->addNode( new OrderDataNode( $orderNumber , $orderValue ) );
313 | $this->transaction->addNode( new PaymentMethodNode( $paymentProduct , $parcels , $creditCard ) );
314 | $this->transaction->setReturnURL( $this->getReturnURL() );
315 | $this->transaction->setCapture( $this->automaticCapture );
316 |
317 | if ( !is_null( $freeField ) ) {
318 | $this->transaction->setFreeField( $freeField );
319 | }
320 |
321 | $this->transaction->setURL( $this->cieloURL );
322 |
323 | return $this->transaction;
324 | } else {
325 | throw new UnexpectedValueException( sprintf( 'O valor do pedido deve ser numérico, %s foi dado.' , gettype( $orderValue ) ) );
326 | }
327 | }
328 | }
329 |
330 | /**
331 | * Recupera o número de afiliação da loja junto à Cielo
332 | * @return string O código de afiliação
333 | * @throws BadMethodCallException Se não tivermos um código de afiliação
334 | */
335 | public function getAffiliationCode() {
336 | if ( is_null( $this->affiliationCode ) ) {
337 | throw new BadMethodCallException( 'Código de afiliação não definido' );
338 | } else {
339 | return $this->affiliationCode;
340 | }
341 | }
342 |
343 | /**
344 | * Recupera a chave da afiliação da loja junto à Cielo
345 | * @return string A chave de afiliação
346 | * @throws BadMethodCallException Se não tivermos uma chave de afiliação
347 | */
348 | public function getAffiliationKey() {
349 | if ( is_null( $this->affiliationKey ) ) {
350 | throw new BadMethodCallException( 'Chave de afiliação não definido' );
351 | } else {
352 | return $this->affiliationKey;
353 | }
354 | }
355 |
356 | /**
357 | * Recupera o objeto de requisição HTTP
358 | * @return HTTPRequest
359 | */
360 | public function getHTTPRequester() {
361 | if ( is_null( $this->httpRequester ) ) {
362 | return new CURL();
363 | }
364 |
365 | return $this->httpRequester;
366 | }
367 |
368 | /**
369 | * @brief Recupera a URL de retorno que será utilizado pela Cielo para retornar à loja
370 | * @details O valor retornado pode utilizar o template {pedido} para compor a URL
371 | * de retorno, esse valor será substituído pelo número do pedido informado.
372 | * @return string
373 | */
374 | public function getReturnURL() {
375 | if ( !is_null( $this->returnURL ) ) {
376 | return $this->returnURL;
377 | } else {
378 | throw new BadMethodCallException( 'Ainda não foi definido a URL de retorno' );
379 | }
380 | }
381 |
382 | /**
383 | * Define o código de afiliação
384 | * @param string $affiliationCode Código de afiliação
385 | * @throws InvalidArgumentException Se o código de afiliação não for uma string
386 | */
387 | public function setAffiliationCode( $affiliationCode ) {
388 | if ( is_string( $affiliationCode ) ) {
389 | $this->affiliationCode = & $affiliationCode;
390 | } else {
391 | throw new InvalidArgumentException( 'Código de afiliação inválido' );
392 | }
393 | }
394 |
395 | /**
396 | * Define a chave de afiliação
397 | * @param string $affiliationKey Chave de afiliação
398 | * @throws InvalidArgumentException Se a chave de afiliação não for uma string
399 | */
400 | public function setAffiliationKey( $affiliationKey ) {
401 | if ( is_string( $affiliationKey ) ) {
402 | $this->affiliationKey = & $affiliationKey;
403 | } else {
404 | throw new InvalidArgumentException( 'Chave de afiliação inválida' );
405 | }
406 | }
407 |
408 | /**
409 | * Define a URL de retorno
410 | * @param string $url
411 | * @throws InvalidArgumentException Se a URL de retorno for inválida
412 | */
413 | public function setReturnURL( $url ) {
414 | if ( filter_var( $url , FILTER_VALIDATE_URL ) ) {
415 | $this->returnURL = & $url;
416 | } else {
417 | throw new InvalidArgumentException( 'URL de retorno inválida' );
418 | }
419 | }
420 |
421 | /**
422 | * Define o objeto de requisição HTTP
423 | * @param HTTPRequest $httpRequester
424 | * @return CieloBuilder
425 | */
426 | public function useHttpRequester( HTTPRequest $httpRequester ) {
427 | $this->httpRequester = $httpRequester;
428 |
429 | return $this;
430 | }
431 | }
--------------------------------------------------------------------------------
/dso/cielo/CieloMode.php:
--------------------------------------------------------------------------------
1 |
11 | * Durante os testes, o modo DESENVOlVIMENTO deve ser utilizado,
12 | * nessa situação, a URL do serviço será https://qasecommerce.cielo.com.br/servicos/ecommwsec.do e quando
13 | * estiver em produção a URL do serviço será https://ecommerce.cbmp.com.br/servicos/ecommwsec.do
14 | * @ingroup Cielo
15 | * @interface CieloMode
16 | */
17 | interface CieloMode {
18 | /**
19 | * @brief Ambiente de testes
20 | * @details Define que está em ambiente de testes, deve ser utilizado antes da homologação
21 | */
22 | const DEPLOYMENT = 1;
23 |
24 | /**
25 | * @brief Ambiente de produção
26 | * @details Define que está em ambiente de produção, deve ser utilizado após a homologação
27 | */
28 | const PRODUCTION = 2;
29 | }
--------------------------------------------------------------------------------
/dso/cielo/CreditCard.php:
--------------------------------------------------------------------------------
1 |
86 | * @li Exemplo de retorno para uma transação
87 | *
88 | * <?xml version="1.0" encoding="ISO-8859-1"?>
89 | * <transacao id="1" versao="1.0.0" xmlns="http://ecommerce.cbmp.com.br">
90 | * <tid>100173489800B2F81001</tid>
91 | * <dados-pedido>
92 | * <numero>123</numero>
93 | * <valor>100</valor>
94 | * <moeda>986</moeda>
95 | * <data-hora>2010-08-09T11:21:29.305-03:00</data-hora>
96 | * <idioma>PT</idioma>
97 | * </dados-pedido>
98 | * <forma-pagamento>
99 | * <produto>1</produto>
100 | * <parcelas>1</parcelas>
101 | * </forma-pagamento>
102 | * <status>0</status>
103 | * <url-autenticacao>https://qasecommerce.cielo.com.br/web/index.cbmp?id=bf9b310513668bdf92797518eb249c03</url-autenticacao>
104 | * </transacao>
105 | *
106 | * @li Exemplo de um retorno de erro
107 | *
108 | * <?xml version="1.0" encoding="UTF-8"?>
109 | * <erro xmlns="http://ecommerce.cbmp.com.br">
110 | * <codigo>032</codigo>
111 | * <mensagem>Valor de captura inválido</mensagem>
112 | * </erro>
113 | *
114 | *
115 | * @param $xml string XML Retornado por uma chamada RequisicaoAutenticacao
116 | * @throws Exception Se o nó raiz da resposta da Cielo for um <erro />
117 | */
118 | public function __construct( $xml ) {
119 | libxml_use_internal_errors( true );
120 |
121 | $dom = new DOMDocument();
122 | $dom->loadXML( $xml );
123 |
124 | if ( $dom->getElementsByTagName( 'erro' )->item( 0 ) instanceof DOMElement ) {
125 | $codigo = $dom->getElementsByTagName( 'codigo' )->item( 0 )->nodeValue;
126 | $mensagem = $dom->getElementsByTagName( 'mensagem' )->item( 0 )->nodeValue;
127 |
128 | throw new Exception( $mensagem , $codigo );
129 | } else if ( ( $retorno = $dom->getElementsByTagName( 'retorno-tid' )->item( 0 ) ) instanceof DOMElement ){
130 | $this->tid = $this->getNodeValue( 'tid' , $retorno );
131 | } else {
132 | $transacao = $dom->getElementsByTagName( 'transacao' )->item( 0 );
133 |
134 | if ( $transacao instanceof DOMElement ) {
135 | $this->tid = $this->getNodeValue( 'tid' , $transacao );
136 | $this->pan = $this->getNodeValue( 'pan' , $transacao );
137 |
138 | $this->parseOrderData( $dom->getElementsByTagName( 'dados-pedido' )->item( 0 ) );
139 | $this->parsePaymentMethod( $dom->getElementsByTagName( 'forma-pagamento' )->item( 0 ) );
140 | $this->parseAuthentication( $dom->getElementsByTagName( 'autenticacao' )->item( 0 ) );
141 | $this->parseAuthorization( $dom->getElementsByTagName( 'autorizacao' )->item( 0 ) );
142 | $this->parseCapture( $dom->getElementsByTagName( 'captura' )->item( 0 ) );
143 | $this->parseCancellation( $dom->getElementsByTagName( 'cancelamento' )->item( 0 ) );
144 |
145 | $this->status = $this->getNodeValue( 'status' , $transacao );
146 | $this->status = is_null( $this->status ) ? -1 : (int) $this->status;
147 | $this->url = $this->getNodeValue( 'url-autenticacao' , $transacao );
148 | } else {
149 | throw new RuntimeException( 'Um erro inesperado ocorreu, não existe um nó transação no retorno' );
150 | }
151 | }
152 | }
153 |
154 | /**
155 | * @brief Recupera os dados de autenticação.
156 | * @details Dados da autenticação caso tenha passado por essa etapa.
157 | * @return AuthenticationNode
158 | */
159 | public function getAuthentication() {
160 | return $this->authentication;
161 | }
162 |
163 | /**
164 | * @brief Recupera os dados de autorização.
165 | * @details Dados da autorização caso tenha passado por essa etapa.
166 | * @return AuthorizationNode
167 | */
168 | public function getAuthorization() {
169 | return $this->authorization;
170 | }
171 |
172 | /**
173 | * @brief Recupera os dados de cancelamento.
174 | * @details Dados do cancelamento caso tenha passado por essa etapa.
175 | * @return CancellationNode
176 | */
177 | public function getCancellation() {
178 | return $this->capture;
179 | }
180 |
181 | /**
182 | * @brief Recupera os dados de captura.
183 | * @details Dados da captura caso tenha passado por essa etapa.
184 | * @return CaptureNode
185 | */
186 | public function getCapture() {
187 | return $this->capture;
188 | }
189 |
190 | /**
191 | * @brief Recupera os dados do pedido.
192 | * @details Idêntico ao enviado pela loja na criação da transação.
193 | * @return OrderDataNode
194 | */
195 | public function getOrderData() {
196 | return $this->orderData;
197 | }
198 |
199 | /**
200 | * @brief Recupera a forma de pagamento.
201 | * @details Idêntico ao enviado pela loja na criação da transação.
202 | * @return PaymentMethodNode
203 | */
204 | public function getPaymentMethod() {
205 | return $this->paymentMethod;
206 | }
207 |
208 | /**
209 | * Recupera o valor de um nó
210 | * @param $name string Nome do nó que se deseja recuperar
211 | * @param $node DOMElement Nó pai que contém o nó desejado
212 | * @return string
213 | */
214 | private function getNodeValue( $name , DOMElement $node ) {
215 | $element = $node->getElementsByTagName( $name )->item( 0 );
216 |
217 | if ( !is_null( $element ) ) {
218 | return $element->nodeValue;
219 | }
220 |
221 | return null;
222 | }
223 |
224 | /**
225 | * Recupera o Hash do número do cartão do portador.
226 | * @return string
227 | */
228 | public function getPan() {
229 | return $this->pan;
230 | }
231 |
232 | /**
233 | * @brief Recupera o status da transação
234 | * @details O código de status, pode ser um dos seguintes:
235 | * @li 0 - Criada
236 | * @li 1 - Em andamento
237 | * @li 2 - Autenticada
238 | * @li 3 - Não autenticada
239 | * @li 4 - Autorizada ou pendente de captura
240 | * @li 5 - Não autorizada
241 | * @li 6 - Capturada
242 | * @li 8 - Não capturada
243 | * @li 9 - Cancelada
244 | * @return integer
245 | * @see TransacaoStatus
246 | */
247 | public function getStatus() {
248 | return $this->status;
249 | }
250 |
251 | /**
252 | * Recupera o ID da transação
253 | * @return string
254 | */
255 | public function getTID() {
256 | return $this->tid;
257 | }
258 |
259 | /**
260 | * Recupera a URL de redirecionamento à Cielo.
261 | * @return string
262 | */
263 | public function getAuthenticationURL() {
264 | return $this->url;
265 | }
266 |
267 | /**
268 | * Interpreta a autenticação caso tenha passado por essa etapa.
269 | * @param $element DOMElement Nó autenticacao
270 | */
271 | private function parseAuthentication( DOMElement $element = null ) {
272 | if ( !is_null( $element ) ) {
273 | $codigo = $this->getNodeValue( 'codigo' , $element );
274 | $mensagem = $this->getNodeValue( 'mensagem' , $element );
275 | $dataHora = $this->getNodeValue( 'data-hora' , $element );
276 | $valor = $this->getNodeValue( 'valor' , $element );
277 | $eci = $this->getNodeValue( 'eci' , $element );
278 |
279 | $this->authentication = new AuthenticationNode( $codigo , $mensagem , $dataHora , $valor , $eci );
280 | }
281 | }
282 |
283 | /**
284 | * Interpreta a autorização caso tenha passado por essa etapa.
285 | * @param $element DOMElement Nó autorizacao
286 | */
287 | private function parseAuthorization( DOMElement $element = null ) {
288 | if ( !is_null( $element ) ) {
289 | $codigo = $this->getNodeValue( 'codigo' , $element );
290 | $mensagem = $this->getNodeValue( 'mensagem' , $element );
291 | $dataHora = $this->getNodeValue( 'data-hora' , $element );
292 | $valor = $this->getNodeValue( 'valor' , $element );
293 | $lr = $this->getNodeValue( 'lr' , $element );
294 | $arp = $this->getNodeValue( 'arp' , $element );
295 |
296 | $this->authorization = new AuthorizationNode( $codigo , $mensagem , $dataHora , $valor , $lr , $arp );
297 | }
298 | }
299 |
300 | /**
301 | * Interpreta os dados do pedido anexados à transação
302 | * @param $element DOMElement Nó dados-pedido
303 | */
304 | private function parseOrderData( DOMElement $element = null ) {
305 | if ( !is_null( $element ) ) {
306 | $numero = $this->getNodeValue( 'numero' , $element );
307 | $valor = $this->getNodeValue( 'valor' , $element );
308 | $moeda = $this->getNodeValue( 'moeda' , $element );
309 | $dataHora = $this->getNodeValue( 'data-hora' , $element );
310 | $idioma = $this->getNodeValue( 'idioma' , $element );
311 |
312 | $this->orderData = new OrderDataNode( $numero , $valor , $moeda , $dataHora , $idioma );
313 | }
314 | }
315 |
316 | /**
317 | * Interpreta a forma de pagamento anexada à transação
318 | * @param $element DOMElement Nó forma-pagamento
319 | */
320 | private function parsePaymentMethod( DOMElement $element = null ) {
321 | if ( !is_null( $element ) ) {
322 | $produto = $this->getNodeValue( 'produto' , $element );
323 | $parcelas = $this->getNodeValue( 'parcelas' , $element );
324 | $bandeira = $this->getNodeValue( 'bandeira' , $element );
325 |
326 | $this->paymentMethod = new PaymentMethodNode( $produto , (int) $parcelas , $bandeira );
327 | }
328 | }
329 |
330 | /**
331 | * Interpreta a cancelamento caso tenha passado por essa etapa.
332 | * @param $element DOMElement Nó cancelamento
333 | */
334 | private function parseCancellation( DOMElement $element = null ) {
335 | if ( !is_null( $element ) ) {
336 | $codigo = $this->getNodeValue( 'codigo' , $element );
337 | $mensagem = $this->getNodeValue( 'mensagem' , $element );
338 | $dataHora = $this->getNodeValue( 'data-hora' , $element );
339 | $valor = $this->getNodeValue( 'valor' , $element );
340 |
341 | $this->cancellation = new CancellationNode( $codigo , $mensagem , $dataHora , $valor );
342 | }
343 | }
344 |
345 | /**
346 | * Interpreta a captura caso tenha passado por essa etapa.
347 | * @param $element DOMElement Nó captura
348 | */
349 | private function parseCapture( DOMElement $element = null ) {
350 | if ( !is_null( $element ) ) {
351 | $codigo = $this->getNodeValue( 'codigo' , $element );
352 | $mensagem = $this->getNodeValue( 'mensagem' , $element );
353 | $dataHora = $this->getNodeValue( 'data-hora' , $element );
354 | $valor = $this->getNodeValue( 'valor' , $element );
355 |
356 | $this->capture = new CaptureNode( $codigo , $mensagem , $dataHora , $valor );
357 | }
358 | }
359 | }
--------------------------------------------------------------------------------
/dso/cielo/TransactionStatus.php:
--------------------------------------------------------------------------------
1 | httpRequester = $httpRequester;
61 | $this->nodes = new ArrayObject();
62 | $this->version = $version;
63 | }
64 |
65 | /**
66 | * Adiciona um objeto que será representado como um nó no XML que será enviado à Cielo
67 | * @param XMLNode $node
68 | */
69 | public function addNode( XMLNode $node ) {
70 | $this->nodes->append( $node );
71 | }
72 |
73 | /**
74 | * Faz a requisição no webservice
75 | * @return string XML de retorno
76 | */
77 | public function call() {
78 | $this->httpRequester->open( $this->url );
79 |
80 | $this->requestXML = $this->createXMLNode();
81 | $this->responseXML = $this->httpRequester->execute( array( 'mensagem' => $this->requestXML ) , HTTPRequestMethod::POST );
82 |
83 | return $this->responseXML;
84 | }
85 |
86 | /**
87 | * Cria o nó XML referente ao objeto.
88 | * @return string
89 | * @see XMLNode::createXMLNode()
90 | */
91 | public function createXMLNode() {
92 | $root = $this->getRootNode();
93 | $xml = '';
94 |
95 | foreach ( $this->nodes->getIterator() as $node ) {
96 | $xml .= $node->createXMLNode();
97 | }
98 |
99 | return sprintf( '%s<%s id="%s" versao="%s" xmlns="%s">%s%s>' , PHP_EOL , $root , $this->getId() , $this->version , $this->getNamespace() , $xml , $root );
100 | }
101 |
102 | /**
103 | * Recupera o ID do nó raiz
104 | * @return string
105 | */
106 | abstract protected function getId();
107 |
108 | /**
109 | * Recupera o namespace do XML que será enviado para o webservice
110 | * @return string
111 | */
112 | protected function getNamespace() {
113 | return 'http://ecommerce.cbmp.com.br';
114 | }
115 |
116 | /**
117 | * Recupera o nome do nó raiz do XML que será enviado à Cielo
118 | * @return string
119 | */
120 | abstract protected function getRootNode();
121 |
122 | /**
123 | * Recupera o XML de requisição
124 | * @param boolean $format Indica se o retorno deve ser formatado
125 | * @return string
126 | */
127 | public function getRequestXML( $format = false ) {
128 | return $format ? highlight_string( $this->requestXML , true ) : $this->requestXML;
129 | }
130 |
131 | /**
132 | * Recupera o XML de resposta
133 | * @param boolean $format Indica se o retorno deve ser formatado
134 | * @return string
135 | */
136 | public function getResponseXML( $format = false ) {
137 | return $format ? highlight_string( $this->responseXML , true ) : $this->responseXML;
138 | }
139 |
140 | /**
141 | * Define a URL da requisição
142 | * @param string $url
143 | * @throws InvalidArgumentException Se a URL for inválida
144 | */
145 | public function setURL( $url ) {
146 | if ( filter_var( $url , FILTER_VALIDATE_URL ) ) {
147 | $this->url = $url;
148 | } else {
149 | throw new InvalidArgumentException( 'URL inválida' );
150 | }
151 | }
152 | }
--------------------------------------------------------------------------------
/dso/cielo/nodes/AuthenticationNode.php:
--------------------------------------------------------------------------------
1 | Os dois últimos dígitos são os centavos.
26 | * @param integer $code Código do processamento.
27 | * @param string $message Detalhe do processamento.
28 | * @param string $dateTime Data hora do processamento.
29 | * @param integer $value Valor do processamento sem pontuação.
30 | * @param integer $eci Nível de segurança.
31 | */
32 | public function __construct( $code , $message , $dateTime , $value , $eci ) {
33 | parent::__construct( $code , $message , $dateTime , $value );
34 |
35 | $this->eci = $eci;
36 | }
37 |
38 | /**
39 | * Cria o nó XML referente ao objeto.
40 | * @return string
41 | * @see XMLNode::createXMLNode()
42 | */
43 | public function createXMLNode() {
44 | $node = '';
45 |
46 | return $node;
47 | }
48 |
49 | /**
50 | * Recupera o nível de segurança da transação
51 | * @return integer
52 | */
53 | public function getECI() {
54 | return $this->eci;
55 | }
56 | }
--------------------------------------------------------------------------------
/dso/cielo/nodes/AuthorizationNode.php:
--------------------------------------------------------------------------------
1 | Os dois últimos dígitos são os centavos.
37 | * @param integer $lr Retorno da autorização.
38 | * @attention Quando negada, é o motivo da negação.
39 | * @param string $arp Código da autorização caso a transação tenha sido autorizada com sucesso.
40 | */
41 | public function __construct( $code , $message , $dateTime , $value , $lr , $arp ) {
42 | parent::__construct( $code , $message , $dateTime , $value );
43 | $this->lr = $lr;
44 | $this->arp = $arp;
45 | }
46 |
47 | /**
48 | * Cria o nó XML referente ao objeto.
49 | * @return string
50 | * @see XMLNode::createXMLNode()
51 | */
52 | public function createXMLNode() {
53 | $node = '';
54 |
55 | return $node;
56 | }
57 |
58 | /**
59 | * Recupera o retorno da autorização.
60 | * @attention Quando negada, é o motivo da negação.
61 | * @return integer
62 | */
63 | public function getLR() {
64 | return $this->lr;
65 | }
66 |
67 | /**
68 | * Código da autorização caso a transação tenha sido autorizada com sucesso.
69 | * @return string
70 | */
71 | public function getArp() {
72 | return $this->arp;
73 | }
74 | }
--------------------------------------------------------------------------------
/dso/cielo/nodes/CancellationNode.php:
--------------------------------------------------------------------------------
1 | ';
24 |
25 | return $node;
26 | }
27 | }
--------------------------------------------------------------------------------
/dso/cielo/nodes/CaptureNode.php:
--------------------------------------------------------------------------------
1 | ';
24 |
25 | return $node;
26 | }
27 | }
--------------------------------------------------------------------------------
/dso/cielo/nodes/CardDataNode.php:
--------------------------------------------------------------------------------
1 | obrigatório se $indicator = 1
31 | * @var integer
32 | */
33 | private $securityCode;
34 |
35 | /**
36 | * Indicador de segurança
37 | * @see ECI
38 | * @var integer
39 | */
40 | private $indicator;
41 |
42 | /**
43 | * Nome do portador do cartão
44 | * @var string
45 | */
46 | private $holderName;
47 |
48 | /**
49 | * Cria o objeto que representa o nó dados-portador
50 | * @param string $cardNumber Número do cartão de crédito
51 | * @param integer $cardExpiration Data de expiração do cartão no formato yyyymm
52 | * @param integer $indicator Indicador do código de segurança
53 | * @param integer $securityCode Código de segurança
54 | * @param string $holderName Nome do titular do cartão
55 | */
56 | public function __construct( $cardNumber , $cardExpiration , $indicator , $securityCode = null , $holderName = null ) {
57 | if ( $indicator == 1 && is_null( $securityCode ) ){
58 | throw new InvalidArgumentException( 'Quando o indicador do código de segurança for 1, o código de segurança deve ser informado' );
59 | }
60 |
61 | $this->cardNumber = $cardNumber;
62 | $this->cardExpiration = $cardExpiration;
63 | $this->indicator = $indicator;
64 | $this->securityCode = $securityCode;
65 | $this->holderName = $holderName;
66 | }
67 |
68 | /**
69 | * Cria o nó XML referente ao objeto.
70 | * @return string
71 | * @see XMLNode::createXMLNode()
72 | */
73 | public function createXMLNode() {
74 | $node = '';
75 |
76 | $node .= sprintf( '%s' , $this->cardNumber );
77 | $node .= sprintf( '%s' , $this->cardExpiration );
78 | $node .= sprintf( '%s' , $this->indicator );
79 |
80 | if ( !empty( $this->securityCode ) ) {
81 | $node .= sprintf( '%s' , $this->securityCode );
82 | }
83 |
84 | if ( !empty( $this->holderName ) ) {
85 | $node .= sprintf( '%s' , $this->holderName );
86 | }
87 |
88 | $node .= '';
89 |
90 | return $node;
91 | }
92 |
93 | /**
94 | * Recupera o valor de $cardNumber
95 | * @return string
96 | */
97 | public function getCardNumber() {
98 | return $this->cardNumber;
99 | }
100 |
101 | /**
102 | * Recupera o valor de $cardExpiration
103 | * @return integer
104 | */
105 | public function getCardExpiration() {
106 | return $this->cardExpiration;
107 | }
108 |
109 | /**
110 | * Recupera o valor de $securityCode
111 | * @return integer
112 | */
113 | public function getSecurityCode() {
114 | return $this->securityCode;
115 | }
116 |
117 | /**
118 | * Recupera o valor de $indicator
119 | * @return integer
120 | */
121 | public function getIndicator() {
122 | return $this->indicator;
123 | }
124 |
125 | /**
126 | * Recupera o valor de $holderName
127 | * @return string
128 | */
129 | public function getHolderName() {
130 | return $this->holderName;
131 | }
132 | }
--------------------------------------------------------------------------------
/dso/cielo/nodes/EcDataNode.php:
--------------------------------------------------------------------------------
1 | affiliationCode = $affiliationCode;
37 | $this->affiliationKey = $affiliationKey;
38 | }
39 |
40 | /**
41 | * Cria o nó XML referente ao objeto.
42 | * @return string
43 | * @see XMLNode::createXMLNode()
44 | */
45 | public function createXMLNode() {
46 | $node = '';
47 |
48 | if ( !empty( $this->affiliationCode ) ) {
49 | $node .= sprintf( '%s' , $this->affiliationCode );
50 | }
51 |
52 | if ( !empty( $this->affiliationKey ) ) {
53 | $node .= sprintf( '%s' , $this->affiliationKey );
54 | }
55 |
56 | $node .= '';
57 |
58 | return $node;
59 | }
60 | }
--------------------------------------------------------------------------------
/dso/cielo/nodes/HolderDataNode.php:
--------------------------------------------------------------------------------
1 | obrigatório se $indicator = 1
32 | * @var integer
33 | */
34 | private $securityCode;
35 |
36 | /**
37 | * Indicador de segurança
38 | * @see ECI
39 | * @var integer
40 | */
41 | private $indicator;
42 |
43 | /**
44 | * Nome do portador do cartão
45 | * @var string
46 | */
47 | private $holderName;
48 |
49 | /**
50 | * Cria o objeto que representa o nó dados-portador
51 | * @param string $cardNumber Número do cartão de crédito
52 | * @param integer $cardExpiration Data de expiração do cartão no formato yyyymm
53 | * @param integer $indicator Indicador do código de segurança
54 | * @param integer $securityCode Código de segurança
55 | * @param string $holderName Nome do titular do cartão
56 | */
57 | public function __construct( $cardNumber , $cardExpiration , $indicator , $securityCode = null , $holderName = null ) {
58 | if ( $indicator == 1 && is_null( $securityCode ) ){
59 | throw new InvalidArgumentException( 'Quando o indicador do código de segurança for 1, o código de segurança deve ser informado' );
60 | }
61 |
62 | $this->cardNumber = $cardNumber;
63 | $this->cardExpiration = $cardExpiration;
64 | $this->indicator = $indicator;
65 | $this->securityCode = $securityCode;
66 | $this->holderName = $holderName;
67 | }
68 |
69 | /**
70 | * Cria o nó XML referente ao objeto.
71 | * @return string
72 | * @see XMLNode::createXMLNode()
73 | */
74 | public function createXMLNode() {
75 | $node = '';
76 |
77 | $node .= sprintf( '%s' , $this->cardNumber );
78 | $node .= sprintf( '%s' , $this->cardExpiration );
79 | $node .= sprintf( '%s' , $this->indicator );
80 |
81 | if ( !empty( $this->securityCode ) ) {
82 | $node .= sprintf( '%s' , $this->securityCode );
83 | }
84 |
85 | if ( !empty( $this->holderName ) ) {
86 | $node .= sprintf( '%s' , $this->holderName );
87 | }
88 |
89 | $node .= '';
90 |
91 | return $node;
92 | }
93 |
94 | /**
95 | * Recupera o valor de $cardNumber
96 | * @return string
97 | */
98 | public function getCardNumber() {
99 | return $this->cardNumber;
100 | }
101 |
102 | /**
103 | * Recupera o valor de $cardExpiration
104 | * @return integer
105 | */
106 | public function getCardExpiration() {
107 | return $this->cardExpiration;
108 | }
109 |
110 | /**
111 | * Recupera o valor de $securityCode
112 | * @return integer
113 | */
114 | public function getSecurityCode() {
115 | return $this->securityCode;
116 | }
117 |
118 | /**
119 | * Recupera o valor de $indicator
120 | * @return integer
121 | */
122 | public function getIndicator() {
123 | return $this->indicator;
124 | }
125 |
126 | /**
127 | * Recupera o valor de $holderName
128 | * @return string
129 | */
130 | public function getHolderName() {
131 | return $this->holderName;
132 | }
133 | }
--------------------------------------------------------------------------------
/dso/cielo/nodes/OrderDataNode.php:
--------------------------------------------------------------------------------
1 | 986 para Real R$)
56 | * @param string $dateTime Data e hora do pedido
57 | * @param string $language Idioma do pedido:
58 | * @li PT - português
59 | * @li EN - inglês
60 | * @li ES - espanhol
61 | * Com base nessa informação é definida a língua a ser utilizada nas telas da Cielo. Caso não preenchido, assume-se PT.
62 | */
63 | public function __construct( $orderNumber , $orderValue , $currency = 986 , $dateTime = null , $language = 'PT' ) {
64 | $this->orderNumber = $orderNumber;
65 | $this->orderValue = (int) $orderValue;
66 | $this->currency = $currency;
67 |
68 | if ( is_null( $dateTime ) ) {
69 | $dateTime = date( 'c' );
70 | } else {
71 | $dateTime = date( 'c' , strtotime( $dateTime ) );
72 | }
73 |
74 | $this->language = $language;
75 | $this->dateTime = $dateTime;
76 | }
77 |
78 | /**
79 | * Cria o nó XML referente ao objeto.
80 | * @return string
81 | * @see XMLNode::createXMLNode()
82 | */
83 | public function createXMLNode() {
84 | $node = '';
85 |
86 | if ( !empty( $this->orderNumber ) ) {
87 | $node .= sprintf( '%s' , $this->orderNumber );
88 | }
89 |
90 | if ( !empty( $this->orderValue ) ) {
91 | $node .= sprintf( '%s' , $this->orderValue );
92 | }
93 |
94 | if ( !empty( $this->currency ) ) {
95 | $node .= sprintf( '%s' , $this->currency );
96 | }
97 |
98 | $node .= sprintf( '%s' , $this->dateTime );
99 |
100 | if ( !empty( $this->language ) ) {
101 | $node .= sprintf( '%s' , $this->language );
102 | }
103 |
104 | $node .= '';
105 |
106 | return $node;
107 | }
108 |
109 | /**
110 | * Recupera a data e hora do pedido.
111 | * @return string
112 | */
113 | public function getDateTime() {
114 | return $this->dateTime;
115 | }
116 |
117 | /**
118 | * Recupera o idioma do pedido:
119 | * @li PT - português
120 | * @li EN - inglês
121 | * @li ES - espanhol
122 | * @return string
123 | */
124 | public function getLanguage() {
125 | return $this->language;
126 | }
127 |
128 | /**
129 | * Código numérico da moeda na ISO 4217. Para o Real, o código é 986.
130 | * @return integer
131 | */
132 | public function getCurrency() {
133 | return $this->currency;
134 | }
135 |
136 | /**
137 | * Recupera o número do pedido da loja
138 | * @return string
139 | */
140 | public function getOrderNumber() {
141 | return $this->orderNumber;
142 | }
143 |
144 | /**
145 | * Recupera o valor do pedido
146 | * @return float
147 | */
148 | public function getOrderValue() {
149 | return $this->orderValue;
150 | }
151 | }
--------------------------------------------------------------------------------
/dso/cielo/nodes/PaymentMethodNode.php:
--------------------------------------------------------------------------------
1 | 1
38 | * @var integer
39 | */
40 | private $parcels;
41 |
42 | /**
43 | * Constroi o objeto que representa a forma de pagamento
44 | * @param string $product Código do produto, pode ser um dos seguintes:
45 | * @li 1 Crédito à vista
46 | * @li 2 Parcelado Loja
47 | * @li 3 Parcelado Administradora
48 | * @li A Débito
49 | * @param integer $parcels Número de parcelas. Para crédito à vista ou Débito, utilizar 1.
50 | * @param string $creditCard Bandeira do cartão
51 | * @see PaymentMethod
52 | * @see CreditCard
53 | * @throws UnexpectedValueException Se $parcels não for um inteiro, maior ou igual a 1
54 | * @throws InvalidArgumentException Se o número de parcelas for diferente de 1 para crédito à vista ou débito
55 | * @throws InvalidArgumentException Se o valor de $produto não for válido
56 | */
57 | public function __construct( $product , $parcels = 1 , $creditCard = null ) {
58 | if ( is_int( $parcels ) && ( $parcels >= 1 ) ) {
59 | switch ( $product ) {
60 | case PaymentProduct::ONE_TIME_PAYMENT :
61 | case PaymentProduct::DEBIT :
62 | if ( $parcels > 1 ) {
63 | throw new InvalidArgumentException( 'Para crédito à vista, o número de parcelas deve ser 1' );
64 | }
65 | case PaymentProduct::INSTALLMENTS_BY_CARD_ISSUERS :
66 | case PaymentProduct::INSTALLMENTS_BY_AFFILIATED_MERCHANTS :
67 | $this->product = $product;
68 | $this->parcels = $parcels;
69 | break;
70 | default :
71 | throw new InvalidArgumentException( 'Valor de $produto não é válido.' );
72 | }
73 |
74 | if ( !is_null( $creditCard ) ) {
75 | if ( $creditCard == CreditCard::VISA || $creditCard == CreditCard::MASTER_CARD ) {
76 | $this->creditCard = $creditCard;
77 | } else {
78 | throw new UnexpectedValueException( 'Bandeira não reconhecida.' );
79 | }
80 | }
81 | } else {
82 | throw new UnexpectedValueException( '$parcelas precisa ser um inteiro, maior ou igual a 1' );
83 | }
84 | }
85 |
86 | /**
87 | * Cria o nó XML referente ao objeto.
88 | * @return string
89 | * @see XMLNode::createXMLNode()
90 | */
91 | public function createXMLNode() {
92 | $node = '';
93 | $node .= sprintf( '%s' , $this->creditCard );
94 | $node .= sprintf( '%s' , $this->product );
95 | $node .= sprintf( '%d' , $this->parcels );
96 | $node .= '';
97 |
98 | return $node;
99 | }
100 |
101 | /**
102 | * Recupera o número de parcelas
103 | * @return integer
104 | */
105 | public function getParcels() {
106 | return $this->parcels;
107 | }
108 |
109 | /**
110 | * Recupera o código do produto
111 | * @li 1 - Crédito à Vista
112 | * @li 2 - Parcelado loja
113 | * @li 3 - Parcelado administradora
114 | * @li A - Débito
115 | * @return string
116 | * @see PaymentMethod
117 | */
118 | public function getProduct() {
119 | return $this->product;
120 | }
121 | }
--------------------------------------------------------------------------------
/dso/cielo/nodes/TransactionNode.php:
--------------------------------------------------------------------------------
1 | Os dois últimos dígitos são os centavos.
38 | * @var integer
39 | */
40 | private $value;
41 |
42 | /**
43 | * Constroi o objeto que representa o nó captura
44 | * @param integer $code Código do processamento.
45 | * @param string $message Detalhe do processamento.
46 | * @param string $dateTime Data hora do processamento.
47 | * @param integer $value Valor do processamento sem pontuação.
48 | * @attention Os dois últimos dígitos são os centavos.
49 | */
50 | public function __construct( $code , $message , $dateTime , $value ) {
51 | $this->code = $code;
52 | $this->message = $message;
53 | $this->dateTime = strftime( '%Y-%m-%d %H:%M:%S' , strtotime( $dateTime ) );
54 | $this->value = (int) $value;
55 | }
56 |
57 | /**
58 | * Recupera o código do processamento.
59 | * @return integer
60 | */
61 | public function getCode() {
62 | return $this->code;
63 | }
64 |
65 | /**
66 | * Recupera os detalhes do processamento.
67 | * @return string
68 | */
69 | public function getMessage() {
70 | return $this->message;
71 | }
72 |
73 | /**
74 | * Recupera a data e hora do processamento.
75 | * @return string
76 | */
77 | public function getDateTime() {
78 | return $this->dateTime;
79 | }
80 |
81 | /**
82 | * Recupera o valor do processamento
83 | * @return float
84 | */
85 | public function getValue() {
86 | return (float) $this->value / 100;
87 | }
88 | }
--------------------------------------------------------------------------------
/dso/cielo/nodes/XMLNode.php:
--------------------------------------------------------------------------------
1 |
15 | * Com base na resposta de autenticação, autenticada ou não-autenticada, e nas escolhas efetuadas na
16 | * criação da transação, a autorização é a próxima etapa. Nesse cenário ela é cunhada de autorização
17 | * automática. Embora essa escolha caiba a loja virtual, em conjunto são consideradas outras regras:
18 | * @li Se o portador não se autenticou com sucesso, ela não é executada.
19 | * @li Se o portador autenticou-se com sucesso, ela pode ser executada.
20 | * @li Se o emissor não forneceu mecanismos de autenticação, ela pode ser executada.
21 | * @li Se a resposta do emissor não pôde ser validada, ela não é executada.
22 | *
23 | *
24 | * @attention É nessa etapa que o saldo disponível do cartão do comprador é sensibilizado caso a transação
25 | * tenha sido autorizada.
26 | *
27 | *
28 | * A outra face da autorização é aquela que pode ser efetuada num momento diferente da autenticação.
29 | * O serviço disponível para isso é chamado de autorização posterior.
30 | *
31 | * @ingroup Cielo
32 | * @class AuthorizationRequest
33 | */
34 | class AuthorizationRequest extends AbstractCieloNode {
35 | /**
36 | * ID da transação
37 | * @var string
38 | */
39 | private $tid;
40 |
41 | /**
42 | * Define se a transação será automaticamente capturada caso seja autorizada.
43 | * @var boolean
44 | */
45 | private $capture = false;
46 |
47 | /**
48 | * Cria o nó XML que representa o objeto ou conjunto de objetos na composição
49 | * @return string
50 | * @see Cielo::createXMLNode()
51 | * @throws BadMethodCallException Se a URL de retorno não tiver sido especificada
52 | * @throws BadMethodCallException Se os dados do pedido não tiver sido especificado
53 | */
54 | public function createXMLNode() {
55 | if ( !empty( $this->tid ) ) {
56 | $dom = new DOMDocument( '1.0' , 'UTF-8' );
57 | $dom->loadXML( parent::createXMLNode() );
58 | $dom->encoding = 'UTF-8';
59 |
60 | $namespace = $this->getNamespace();
61 | $query = $dom->getElementsByTagNameNS( $namespace , $this->getRootNode() )->item( 0 );
62 | $EcData = $dom->getElementsByTagNameNS( $namespace , 'dados-ec' )->item( 0 );
63 |
64 | if ( $EcData instanceof DOMElement ) {
65 | $tid = $dom->createElement( 'tid' , $this->tid );
66 | $query->insertBefore( $tid , $EcData );
67 |
68 | $dom->childNodes->item( 0 )->appendChild( $dom->createElement( 'capturar-automaticamente' , $this->capture ? 'true' : 'false' ) );
69 | } else {
70 | throw new BadMethodCallException( 'O nó dados-ec precisa ser informado.' );
71 | }
72 |
73 | return $dom->saveXML();
74 | } else {
75 | throw new BadMethodCallException( 'O ID da transação deve ser informado.' );
76 | }
77 | }
78 |
79 | /**
80 | * Faz a chamada da requisição de autenticação no webservice da Cielo
81 | * @return Transaction
82 | * @see Cielo::call()
83 | */
84 | public function call() {
85 | return new Transaction( parent::call() );
86 | }
87 |
88 | /**
89 | * Define o identificador da transação
90 | * @param string $tid
91 | */
92 | public function setTID( $tid ) {
93 | $this->tid = $tid;
94 | }
95 |
96 | /**
97 | * Recupera o ID do nó raiz
98 | * @return string
99 | */
100 | protected function getId() {
101 | return 6;
102 | }
103 |
104 | /**
105 | * Recupera o nome do nó raiz do XML que será enviado à Cielo
106 | * @return string
107 | */
108 | protected function getRootNode() {
109 | return 'requisicao-autorizacao-portador';
110 | }
111 |
112 | /**
113 | * @brief Define se será feita a captura automática.
114 | * @details Define se a transação será automaticamente capturada caso seja autorizada.
115 | * @param boolean $capture TRUE ou FALSE
116 | * @throws InvalidArgumentException Se $capturar não for um boolean
117 | */
118 | public function setCapture( $capture = true ) {
119 | if ( is_bool( $capture ) ) {
120 | $this->capture = $capture;
121 | } else {
122 | throw new InvalidArgumentException( '$capture precisa ser um boolean' );
123 | }
124 | }
125 | }
--------------------------------------------------------------------------------
/dso/cielo/request/CancellationRequest.php:
--------------------------------------------------------------------------------
1 | tid ) ) {
37 | $dom = new DOMDocument( '1.0' , 'UTF-8' );
38 | $dom->loadXML( parent::createXMLNode() );
39 | $dom->encoding = 'UTF-8';
40 |
41 | $namespace = $this->getNamespace();
42 | $query = $dom->getElementsByTagNameNS( $namespace , $this->getRootNode() )->item( 0 );
43 | $EcData = $dom->getElementsByTagNameNS( $namespace , 'dados-ec' )->item( 0 );
44 |
45 | if ( $EcData instanceof DOMElement ) {
46 | $tid = $dom->createElement( 'tid' , $this->tid );
47 | $query->insertBefore( $tid , $EcData );
48 | } else {
49 | throw new BadMethodCallException( 'O nó dados-ec precisa ser informado.' );
50 | }
51 |
52 | return $dom->saveXML();
53 | } else {
54 | throw new BadMethodCallException( 'O ID da transação deve ser informado.' );
55 | }
56 | }
57 |
58 | /**
59 | * Faz a chamada da requisição de autenticação no webservice da Cielo
60 | * @return Transaction
61 | * @see Cielo::call()
62 | */
63 | public function call() {
64 | return new Transaction( parent::call() );
65 | }
66 |
67 | /**
68 | * Define o identificador da transação
69 | * @param string $tid
70 | */
71 | public function setTID( $tid ) {
72 | $this->tid = $tid;
73 | }
74 |
75 | /**
76 | * Recupera o ID do nó raiz
77 | * @return string
78 | */
79 | protected function getId() {
80 | return $this->tid;
81 | }
82 |
83 | /**
84 | * Recupera o nome do nó raiz do XML que será enviado à Cielo
85 | * @return string
86 | */
87 | protected function getRootNode() {
88 | return 'requisicao-cancelamento';
89 | }
90 | }
--------------------------------------------------------------------------------
/dso/cielo/request/CaptureRequest.php:
--------------------------------------------------------------------------------
1 |
16 | * Para venda na modalidade de Crédito, essa confirmação pode ocorrer
17 | *
18 | * @li Logo após a autorização
19 | * @li Ou num momento posterior
20 | *
21 | * Essa definição é feita através do parâmetro capturar. Consulte o tópico “Criação”.
22 | * Já na modalidade de Débito não existe essa abertura: toda transação de débito autorizada é automaticamente capturada.
23 | *
24 | * @ingroup Cielo
25 | * @class CaptureRequest
26 | */
27 | class CaptureRequest extends AbstractCieloNode {
28 | /**
29 | * ID da transação
30 | * @var string
31 | */
32 | private $tid;
33 |
34 | /**
35 | * Valor da captura. Caso não fornecido, o valor atribuído é o valor da autorização.
36 | * @var integer
37 | */
38 | private $value;
39 |
40 | /**
41 | * Informação adicional para detalhamento da captura
42 | * @var string
43 | */
44 | private $annex;
45 |
46 | /**
47 | * Cria o nó XML que representa o objeto ou conjunto de objetos na composição
48 | * @return string
49 | * @see Cielo::createXMLNode()
50 | * @throws BadMethodCallException Se a URL de retorno não tiver sido especificada
51 | * @throws BadMethodCallException Se os dados do pedido não tiver sido especificado
52 | */
53 | public function createXMLNode() {
54 | if ( !empty( $this->tid ) ) {
55 | $dom = new DOMDocument( '1.0' , 'UTF-8' );
56 | $dom->loadXML( parent::createXMLNode() );
57 | $dom->encoding = 'UTF-8';
58 |
59 | $namespace = $this->getNamespace();
60 | $query = $dom->getElementsByTagNameNS( $namespace , $this->getRootNode() )->item( 0 );
61 | $EcData = $dom->getElementsByTagNameNS( $namespace , 'dados-ec' )->item( 0 );
62 |
63 | if ( $EcData instanceof DOMElement ) {
64 | $tid = $dom->createElement( 'tid' , $this->tid );
65 | $query->insertBefore( $tid , $EcData );
66 |
67 | if ( !is_null( $this->value ) ) {
68 | $value = $dom->createElement( 'valor' , $this->value );
69 | $query->insertBefore( $value , $EcData );
70 | }
71 |
72 | if ( !is_null( $this->annex ) ) {
73 | $annex = $dom->createElement( 'anexo' );
74 | $query->insertBefore( $annex , $EcData );
75 | }
76 | } else {
77 | throw new BadMethodCallException( 'O nó dados-ec precisa ser informado.' );
78 | }
79 |
80 | return $dom->saveXML();
81 | } else {
82 | throw new BadMethodCallException( 'O ID da transação deve ser informado.' );
83 | }
84 | }
85 |
86 | /**
87 | * Faz a chamada da requisição de autenticação no webservice da Cielo
88 | * @return Transaction
89 | * @see Cielo::call()
90 | */
91 | public function call() {
92 | return new Transaction( parent::call() );
93 | }
94 |
95 | /**
96 | * Recupera o ID do nó raiz
97 | * @return string
98 | */
99 | protected function getId() {
100 | return 5;
101 | }
102 |
103 | /**
104 | * Recupera o nome do nó raiz do XML que será enviado à Cielo
105 | * @return string
106 | */
107 | protected function getRootNode() {
108 | return 'requisicao-captura';
109 | }
110 |
111 | /**
112 | * Define uma informação adicional para detalhamento da captura
113 | * @param string $annex
114 | */
115 | public function setAnnex( $annex ) {
116 | if ( is_string( $annex ) ) {
117 | $this->annex = $annex;
118 | } else {
119 | throw new InvalidArgumentException( sprintf( 'Anexo deve ser uma string, %s foi dado' , gettype( $annex ) ) );
120 | }
121 | }
122 |
123 | /**
124 | * Define o identificador da transação
125 | * @param string $tid
126 | */
127 | public function setTID( $tid ) {
128 | $this->tid = $tid;
129 | }
130 |
131 | /**
132 | * @brief Define valor da captura.
133 | * @details Caso não fornecido, o valor atribuído é o valor da autorização.
134 | * @param float $value
135 | * @throws InvalidArgumentException
136 | */
137 | public function setValue( $value ) {
138 | if ( is_float( $value ) || is_int( $value ) ) {
139 | $this->value = $value;
140 | } else {
141 | throw new InvalidArgumentException( sprintf( 'O valor deve ser um inteiro ou float, %s foi dado.' , gettype( $value ) ) );
142 | }
143 | }
144 | }
--------------------------------------------------------------------------------
/dso/cielo/request/QueryRequest.php:
--------------------------------------------------------------------------------
1 | tid ) ) {
33 | $dom = new DOMDocument( '1.0' , 'UTF-8' );
34 | $dom->loadXML( parent::createXMLNode() );
35 | $dom->encoding = 'UTF-8';
36 |
37 | $namespace = $this->getNamespace();
38 | $query = $dom->getElementsByTagNameNS( $namespace , $this->getRootNode() )->item( 0 );
39 | $EcData = $dom->getElementsByTagNameNS( $namespace , 'dados-ec' )->item( 0 );
40 |
41 | if ( $EcData instanceof DOMElement ) {
42 | $tid = $dom->createElement( 'tid' , $this->tid );
43 | $query->insertBefore( $tid , $EcData );
44 | } else {
45 | throw new BadMethodCallException( 'O nó dados-ec precisa ser informado.' );
46 | }
47 |
48 | return $dom->saveXML();
49 | } else {
50 | throw new BadMethodCallException( 'O ID da transação deve ser informado.' );
51 | }
52 | }
53 |
54 | /**
55 | * Faz a chamada da requisição de autenticação no webservice da Cielo
56 | * @return Transaction
57 | * @see Cielo::call()
58 | */
59 | public function call() {
60 | return new Transaction( parent::call() );
61 | }
62 |
63 | /**
64 | * Define o identificador da transação
65 | * @param string $tid
66 | */
67 | public function setTID( $tid ) {
68 | $this->tid = $tid;
69 | }
70 |
71 | /**
72 | * Recupera o ID do nó raiz
73 | * @return string
74 | */
75 | protected function getId() {
76 | return 5;
77 | }
78 |
79 | /**
80 | * Recupera o nome do nó raiz do XML que será enviado à Cielo
81 | * @return string
82 | */
83 | protected function getRootNode() {
84 | return 'requisicao-consulta';
85 | }
86 | }
--------------------------------------------------------------------------------
/dso/cielo/request/TIDRequest.php:
--------------------------------------------------------------------------------
1 |
15 | * A autenticação não é executada via Web Service. Não é efetuada somente com troca de mensagens entre
16 | * loja virtual e Cielo. Ela requer interação com o comprador. Interação tal que é iniciada no ambiente
17 | * da Cielo a partir do momento que a loja redireciona o browser do usuário.
18 | *
19 | *
20 | * Essa transferência de fluxo possui um destino, o qual é especificado pela URL retornada após a criação
21 | * da transação. Ela é pautada por algumas regras. Consulte “Redirecionamento à Cielo” para maiores detalhes.
22 | * Ou navegue pela loja exemplo para tornar mais claro esse entendimento.
23 | *
24 | *
25 | * Após o redirecionamento o portador fornece os dados do cartão no site de e-commerce da Cielo e então a
26 | * autenticação é de fato iniciada. Lembre-se: ela corre sempre no site do emissor. Para isso um segundo
27 | * redirecionamento é efetuado: da Cielo para o banco.
28 | *
29 | *
30 | * @attention Somente o primeiro redirecionamento é de responsabilidade da loja virtual.
31 | *
32 | *
33 | * A tecnologia empregada para autenticação é de escolha do emissor. Pode ser cartão de bingo, token,
34 | * e-cpf entre outras. Entretanto o objetivo é sempre o mesmo: assegurar que o comprador é o portador legítimo.
35 | * Essa verificação é retornada à Cielo e o retorno dos fluxos tem início.
36 | *
37 | * @ingroup Cielo
38 | * @class TransactionRequest
39 | */
40 | class TransactionRequest extends AbstractCieloNode {
41 | /**
42 | * Indicador de autorização automática:
43 | * @li 0 (não autorizar)
44 | * @li 1 (autorizar somente se autenticada)
45 | * @li 2 (autorizar autenticada e não-autenticada)
46 | * @li 3 (autorizar sem passar por autenticação – válido somente para crédito)
47 | * @var integer
48 | */
49 | private $authorize = 2;
50 |
51 | /**
52 | * Seis primeiros números do cartão
53 | * @var integer
54 | */
55 | private $bin;
56 |
57 | /**
58 | * Campo livre
59 | * @var string
60 | */
61 | private $freeField;
62 |
63 | /**
64 | * Define se a transação será automaticamente capturada caso seja autorizada.
65 | * @var boolean
66 | */
67 | private $capture = false;
68 |
69 | /**
70 | * @brief URL da página de retorno.
71 | * @details É para essa tela que o fluxo será retornado ao fim da autenticação e/ou autorização.
72 | * @var string
73 | */
74 | private $returnURL;
75 |
76 | /**
77 | * Cria o nó XML que representa o objeto ou conjunto de objetos na composição
78 | * @return string
79 | * @see Cielo::createXMLNode()
80 | * @throws BadMethodCallException Se a URL de retorno não tiver sido especificada
81 | * @throws BadMethodCallException Se os dados do pedido não tiver sido especificado
82 | */
83 | public function createXMLNode() {
84 | if ( !empty( $this->returnURL ) ) {
85 | $dom = new DOMDocument( '1.0' , 'UTF-8' );
86 | $dom->loadXML( parent::createXMLNode() );
87 | $dom->encoding = 'UTF-8';
88 |
89 | $orderData = $dom->getElementsByTagName( 'dados-pedido' )->item( 0 );
90 |
91 | if ( $orderData instanceof DOMElement ) {
92 | $orderNumber = $orderData->getElementsByTagName( 'numero' )->item( 0 );
93 |
94 | if ( $orderNumber instanceof DOMElement ) {
95 | $this->returnURL = preg_replace( '/\{pedido\}/' , $orderNumber->nodeValue , $this->returnURL );
96 | }
97 |
98 | $dom->childNodes->item( 0 )->appendChild( $dom->createElement( 'url-retorno' , $this->returnURL ) );
99 | $dom->childNodes->item( 0 )->appendChild( $dom->createElement( 'autorizar' , $this->authorize ) );
100 | $dom->childNodes->item( 0 )->appendChild( $dom->createElement( 'capturar' , $this->capture ? 'true' : 'false' ) );
101 |
102 | if ( !is_null( $this->freeField ) ) {
103 | $dom->childNodes->item( 0 )->appendChild( $dom->createElement( 'campo-livre' , $this->freeField ) );
104 | }
105 |
106 | return $dom->saveXML();
107 | } else {
108 | throw new BadMethodCallException( 'O nó contendo os dados do pedido ainda não foi especificado.' );
109 | }
110 | } else {
111 | throw new BadMethodCallException( 'A URL de retorno deve ser especificada.' );
112 | }
113 | }
114 |
115 | /**
116 | * Faz a chamada da requisição de autenticação no webservice da Cielo
117 | * @return Transaction
118 | * @see Cielo::call()
119 | */
120 | public function call() {
121 | return new Transaction( parent::call() );
122 | }
123 |
124 | /**
125 | * Recupera o ID do nó raiz
126 | * @return string
127 | */
128 | protected function getId() {
129 | return '1';
130 | }
131 |
132 | /**
133 | * Recupera o nome do nó raiz do XML que será enviado à Cielo
134 | * @return string
135 | */
136 | protected function getRootNode() {
137 | return 'requisicao-transacao';
138 | }
139 |
140 | /**
141 | * @brief Indicador de autorização automática.
142 | * @details Define se será feita a autorização automática, seu valor pode ser um dos seguinte:
143 | * @param integer $authorize Indicador de autorização automática:
144 | * @li 0 (não autorizar)
145 | * @li 1 (autorizar somente se autenticada)
146 | * @li 2 (autorizar autenticada e não-autenticada)
147 | * @li 3 (autorizar sem passar por autenticação – válido somente para crédito)
148 | * @throws InvalidArgumentException Se o valor informado para $authorize não for um dos descritos acima
149 | */
150 | public function setAuthorization( $authorize = 2 ) {
151 | if ( is_int( $authorize ) && ( $authorize >= 0 && $authorize <= 3 ) ) {
152 | $this->authorize = $authorize;
153 | } else {
154 | throw new InvalidArgumentException( 'Identificador de autorização inválido' );
155 | }
156 | }
157 |
158 | /**
159 | * @brief Seis primeiros números do cartão.
160 | * @details Define os seis primeiros números do cartão no caso de a autenticação estar sendo
161 | * feita pela própria loja
162 | * @param integer $numero
163 | * @throws InvalidArgumentException Se $numero não for um inteiro
164 | */
165 | public function setBin( $numero ) {
166 | if ( is_int( $numero ) ) {
167 | $this->bin = $numero;
168 | } else {
169 | throw new InvalidArgumentException( 'O valor de $numero deve ser um inteiro' );
170 | }
171 | }
172 |
173 | /**
174 | * @brief Campo livre.
175 | * @details Define um valor qualquer para o campo livre, esse valor poderá ser resgatado
176 | * na hora que a Cielo redirecionar de volta para a loja
177 | * @param string $freeField Um valor qualquer
178 | * @throws InvalidArgumentException Se $freeField não for uma string
179 | */
180 | public function setFreeField( $freeField ) {
181 | if ( is_string( $freeField ) ) {
182 | $this->freeField = $freeField;
183 | } else {
184 | throw new InvalidArgumentException( 'O conteúdo do campo livre deve ser uma string' );
185 | }
186 | }
187 |
188 | /**
189 | * @brief Define se será feita a captura automática.
190 | * @details Define se a transação será automaticamente capturada caso seja autorizada.
191 | * @param boolean $capture TRUE ou FALSE
192 | * @throws InvalidArgumentException Se $capturar não for um boolean
193 | */
194 | public function setCapture( $capture = true ) {
195 | if ( is_bool( $capture ) ) {
196 | $this->capture = $capture;
197 | } else {
198 | throw new InvalidArgumentException( '$capture precisa ser um boolean' );
199 | }
200 | }
201 |
202 | /**
203 | * @brief Define a URL da página de retorno.
204 | * @details É para essa tela que o fluxo será retornado ao fim da autenticação e/ou autorização.
205 | * @param string $returnURL
206 | */
207 | public function setReturnURL( $returnURL ) {
208 | $this->returnURL = $returnURL;
209 | }
210 | }
--------------------------------------------------------------------------------
/dso/http/CURL.php:
--------------------------------------------------------------------------------
1 | testResource( false ) ) {
34 | curl_close( $this->curl );
35 | }
36 | }
37 |
38 | /**
39 | * Fecha a conexão HTTP
40 | * @see HTTPRequest::close()
41 | * @throws BadMethodCallException Se o recurso CURL não estiver aberto
42 | */
43 | public function close() {
44 | if ( $this->testResource() ) {
45 | curl_close( $this->curl );
46 | }
47 | }
48 |
49 | /**
50 | * Executa a requisição HTTP
51 | * @param $data array Dados que serão enviados
52 | * @param string $method Método que será utilizado para enviar os dados
53 | * @return string Resposta da requisição HTTP
54 | * @throws BadMethodCallException Caso o recurso não esteja aberto.
55 | */
56 | public function execute( array $data = array() , $method = HTTPRequestMethod::GET ) {
57 | if ( $this->testResource() ) {
58 | curl_setopt( $this->curl , CURLOPT_RETURNTRANSFER , 1 );
59 |
60 | switch ( $method ) {
61 | case HTTPRequestMethod::POST :
62 | curl_setopt( $this->curl , CURLOPT_POST , 1 );
63 | curl_setopt( $this->curl , CURLOPT_POSTFIELDS , http_build_query( $data ) );
64 |
65 | break;
66 | case HTTPRequestMethod::DELETE :
67 | case HTTPRequestMethod::PUT :
68 | curl_setopt( $this->curl , CURLOPT_CUSTOMREQUEST , $method );
69 | case HTTPRequestMethod::GET :
70 | curl_setopt( $this->curl , CURLOPT_URL , sprintf( '%s?%s' , $this->target , http_build_query( $data ) ) );
71 | break;
72 | default :
73 | throw new UnexpectedValueException( 'Método desconhecido' );
74 | }
75 |
76 | $resp = curl_exec( $this->curl );
77 | $error = curl_error( $this->curl );
78 | $errno = curl_errno( $this->curl );
79 |
80 | if ( (int) $errno != 0 ) {
81 | throw new RuntimeException( $error , $errno );
82 | }
83 |
84 | return $resp;
85 | }
86 | }
87 |
88 | /**
89 | * Abre uma conexão HTTP
90 | * @param $target string URL que será utilizado na conexão
91 | * @return boolean TRUE Se for possível iniciar cURL
92 | * @see HTTPRequest::open()
93 | * @throws RuntimeException Se a extensão cURL não estiver instalada no sistema
94 | * @throws RuntimeException Se não for possível iniciar cURL
95 | */
96 | public function open( $target ) {
97 | if ( function_exists( 'curl_init' ) ) {
98 | /**
99 | * Fechamos uma conexão existente antes de abrir uma nova
100 | */
101 | if ( is_resource( $this->curl ) ) {
102 | $this->close();
103 | }
104 |
105 | $curl = curl_init();
106 |
107 | /**
108 | * Verificamos se o recurso CURL foi criado com êxito
109 | */
110 | if ( is_resource( $curl ) ) {
111 | curl_setopt( $curl , CURLOPT_SSL_VERIFYPEER , 0 );
112 | curl_setopt( $curl , CURLOPT_HEADER , 0 );
113 | curl_setopt( $curl , CURLOPT_FOLLOWLOCATION , 1 );
114 | curl_setopt( $curl , CURLOPT_URL , $target );
115 |
116 | $this->curl = $curl;
117 | $this->target = $target;
118 | } else {
119 | throw new RuntimeException( 'Não foi possível iniciar cURL' );
120 | }
121 | } else {
122 | throw new RuntimeException( 'Extensão cURL não está instalada.' );
123 | }
124 | }
125 |
126 | /**
127 | * Testa o recurso cURL e opcionalmente dispara uma exceção se ele não tiver aberto.
128 | * @param $throws boolean Indica se deverá ser disparada uma exceção caso o recurso
129 | * não esteja aberto.
130 | * @return boolean Caso o recurso curl esteja aberto.
131 | * @throws BadMethodCallException Caso o recurso não esteja aberto.
132 | */
133 | private function testResource( $throws = true ) {
134 | if ( !is_resource( $this->curl ) ) {
135 | if ( $throws ) {
136 | throw new BadMethodCallException( 'Recurso cURL não está aberto' );
137 | } else {
138 | return false;
139 | }
140 | }
141 |
142 | return true;
143 | }
144 | }
--------------------------------------------------------------------------------
/dso/http/HTTPRequest.php:
--------------------------------------------------------------------------------
1 |