{"id":24780425,"url":"https://github.com/webgriffe/lib-unicredit-imprese","last_synced_at":"2025-10-12T05:30:36.808Z","repository":{"id":62547713,"uuid":"82560004","full_name":"webgriffe/lib-unicredit-imprese","owner":"webgriffe","description":"Library for Unicredit PagOnline Imprege payment gateway","archived":false,"fork":false,"pushed_at":"2022-07-04T07:00:37.000Z","size":66,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-30T16:37:15.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webgriffe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-20T13:18:58.000Z","updated_at":"2022-07-04T07:00:17.000Z","dependencies_parsed_at":"2022-11-02T22:30:29.417Z","dependency_job_id":null,"html_url":"https://github.com/webgriffe/lib-unicredit-imprese","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2Flib-unicredit-imprese","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2Flib-unicredit-imprese/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2Flib-unicredit-imprese/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webgriffe%2Flib-unicredit-imprese/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webgriffe","download_url":"https://codeload.github.com/webgriffe/lib-unicredit-imprese/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236165650,"owners_count":19105673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-29T10:30:39.231Z","updated_at":"2025-10-12T05:30:31.526Z","avatar_url":"https://github.com/webgriffe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Webgriffe UnicreditImprese PHP library\n==========================================\n\n[![Run Status](https://travis-ci.org/webgriffe/lib-unicredit-imprese.svg?branch=master)](https://travis-ci.org/webgriffe/lib-unicredit-imprese)\n\nThis library provides an integration with the WebServices of Unicredit PagOnline Imprese payment gateway.\nIt was developed by following the technical documentation v.07 of 07/02/2017 provided by Unicredit.\n\nInstallation\n------------\n\nIn order to use this library you have to import it through composer:\n\n```\ncomposer require webgriffe/lib-unicredit-imprese\n```\n\nUsage\n-----\n\n**Payment Initialization**\n\nFirst of all, get an instance of the *Webgriffe\\LibUnicreditImprese\\Client* class. Then, before starting the actual payment, call the *init()* method to set a few basic values, such as whether the library must work in test mode or live mode, the ksig key (provided by Unicredit), the terminal id (provided by Unicredit) and the WSDL URL (which changes between the live and test environments). This call will prepare the client for the actual work.\n\nAfter executing the *init()* call, you can call the *paymentInit()* method to initiate an actual payment request. This method takes a number of arguments including the transaction type (authorize-only or authorize-and-capture), the payment amount, the payment page language code, the payment currency and so on. The notifyUrl argument is the URL that Unicredit will redirect the customer to if the payment is succesful. However, if a serious error occurs, the customer will be redirected to the error URL.\n\nThe *paymentInit()* method takes care to format all arguments in the correct way, sign them using the secret ksig value and send them to Unicredit. Afterwards the returning response is received and parsed, and the result of this operation is a *Webgriffe\\LibUnicreditImprese\\PaymentInit\\Response* object. This ibject contains the outcome of the *paymentInit()* operation; If an error occurred, the *getError()* and *getErrorDesc()* methods of this object van be used to check what error occurred. If there was no error, then Unicredit will return a payment id and a redirect URL, which can be accessed using the *getPaymentId()* and *getRedirectUrl()* methods of the Response object.\n\nIf the *paymentInit()* operation is succesful, then the payment id contained in the response should be saved and the user should be redirected to the URL provided by Unicredit. This will take the user to a page where he/she will be asked to provide the actual payment information required to complete the transaction (credit card number and the like).\n\nAfter this phase, if an error occurs, then the user is redirected to the error URL. Otherwise he/she is redirected to the notify URL. In the latter case it's necessary to verify the payment outcome manually, even if the customer reaches the notify URL.\n\n**Payment verification**\n\nTo verify the status of a payment it's possible to use the *paymentVerify()* method. This method requires a shop-id (a manually-generated transaction identifier, usually an order id) and the payment id that was provided by Unicredit with the *paymentInit()* call.\n\nWith these values the *paymentVerify()* method can check the state of the corresponding payment, returning it as a *Webgriffe\\LibUnicreditImprese\\PaymentVerify\\Response* object. Once again, the *getError()* and *getErrorDesc()* methods can be used to check for errors, but here it's possibile to use the *getRc()*, *getTranId()*, *getAuthCode()*, *getEnrStatus()* and *getAuthStatus()* methods to retrieve pieces of information from the verification result.\n\nUnlike other payment gateways, Unicredit does not perform a server-to-server call to notify about payment approvals. Instead it is the responsibility of the merchant to periodically check the status of each payment. This can be easily done using the aforementioned *paymentVerify()* method.\n\nContributing\n------------\n\nFork this repository, make your changes and submit a pull request.\nPlease run the tests and the coding standards checks before submitting a pull request. You can do it with:\n\n```\ncomposer install\nvendor/bin/phpspec run\nvendor/bin/phpcs\n```\n\nLicense\n-------\n\nThis library is under the MIT license. See the complete license in the LICENSE file.\n\nCredits\n-------\n\nDeveloped by [Webgriffe®](http://www.webgriffe.com/).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebgriffe%2Flib-unicredit-imprese","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebgriffe%2Flib-unicredit-imprese","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebgriffe%2Flib-unicredit-imprese/lists"}