{"id":18781563,"url":"https://github.com/devture/omnipay-econtext","last_synced_at":"2025-12-19T10:30:14.470Z","repository":{"id":56967125,"uuid":"48587916","full_name":"devture/omnipay-econtext","owner":"devture","description":"Econtext (http://www.econtext.jp/) driver for the Omnipay PHP payment processing library","archived":false,"fork":false,"pushed_at":"2016-09-26T07:31:06.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T11:16:18.494Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devture.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-25T18:08:11.000Z","updated_at":"2016-01-14T01:29:50.000Z","dependencies_parsed_at":"2022-08-21T11:20:28.259Z","dependency_job_id":null,"html_url":"https://github.com/devture/omnipay-econtext","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fomnipay-econtext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fomnipay-econtext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fomnipay-econtext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fomnipay-econtext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devture","download_url":"https://codeload.github.com/devture/omnipay-econtext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699211,"owners_count":19682537,"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":"2024-11-07T20:32:36.403Z","updated_at":"2025-12-19T10:30:14.423Z","avatar_url":"https://github.com/devture.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Omnipay: Econtext\n\n**Econtext driver for the Omnipay PHP payment processing library**\n\n[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment\nprocessing library for PHP 5.3+. This package implements [Econtext](http://www.econtext.jp) support for Omnipay.\n\n\n## Preface\n\nThis driver is still in early development.\n**Do not use in production (yet).**\n\n\n## Installation\n\nOmnipay is installed via [Composer](http://getcomposer.org/). To install, simply add it\nto your `composer.json` file:\n\n```json\n{\n    \"require\": {\n        \"devture/omnipay-econtext\": \"@dev\"\n    }\n}\n```\n\nAnd run composer to update your dependencies:\n\n    $ curl -s http://getcomposer.org/installer | php\n    $ php composer.phar update\n\n\n## Basic Usage\n\nThe following gateways are provided by this package:\n\n* Econtext_Merchant (Econtext Merchant API)\n\nFor general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay) repository.\n\n\n### Initializing the gateway\n\n```php\n$gateway = \\Omnipay\\Omnipay::create('Econtext_Merchant');\n$gateway-\u003einitialize(array(\n\t'siteId' =\u003e 'Econtext-provided shopId',\n\t'siteCheckCode' =\u003e 'Econtext-provided chkCode',\n\t'testMode' =\u003e true, //or set to true for production\n));\n```\n\n\n### Create a Card (stores it on the Econtext server)\n\n```php\n$creditCard = new \\Omnipay\\Common\\CreditCard(array(\n\t'firstName' =\u003e '寛',\n\t'lastName' =\u003e '山田',\n\t'number' =\u003e '4980111111111111',\n\t'cvv' =\u003e '123',\n\t'expiryMonth' =\u003e '1',\n\t'expiryYear' =\u003e '2017',\n\t'email' =\u003e 'testcard@example.com',\n));\n\n$transaction = $gateway-\u003ecreateCard(array('card' =\u003e $creditCard));\n\n//Don't forget to catch some exceptions here\n$transactionResponse = $transaction-\u003esend();\n\nvar_dump($transactionResponse-\u003eisSuccessful());\nvar_dump($transactionResponse-\u003egetCardReference());\n```\n\n\n### Retrieve a stored (partial) Card from the Econtext server\n\n```php\n$cardReference = 'from createCard / $transactionResponse-\u003egetCardReference()';\n$transaction = $gateway-\u003eretrieveCard(array('cardReference' =\u003e $cardReference));\n\n//Don't forget to catch some exceptions here\n$transactionResponse = $transaction-\u003esend();\n\nvar_dump($transactionResponse-\u003eisSuccessful());\n\n//You don't really have the full credit card information.\n//Pretty much just the last 4 digits of the number are exposed to you.\nvar_dump($transactionResponse-\u003egetCard()-\u003egetNumberLast4());\n```\n\n\n### Delete a Card stored on the Econtext server\n\n```php\n$cardReference = 'from createCard / $transactionResponse-\u003egetCardReference()';\n$transaction = $gateway-\u003edeleteCard(array('cardReference' =\u003e $cardReference));\n\n//Don't forget to catch some exceptions here\n//Idempotent - feel free to delete as many times as you wish!\n$transactionResponse = $transaction-\u003esend();\n\nvar_dump($transactionResponse-\u003eisSuccessful());\n```\n\n\n### Purchase using an inline-provided Card\n\n```php\n$creditCard = new \\Omnipay\\Common\\CreditCard(array(\n\t'firstName' =\u003e '寛',\n\t'lastName' =\u003e '山田',\n\t'number' =\u003e '4980111111111111',\n\t'cvv' =\u003e '123',\n\t'expiryMonth' =\u003e '1',\n\t'expiryYear' =\u003e '2017',\n\t'email' =\u003e 'testcard@example.com',\n));\n\n$transaction = $gateway-\u003epurchase(array(\n\t'card' =\u003e $creditCard,\n\t'amount' =\u003e 500,\n\t'description' =\u003e 'Noodles',\n));\n\n//Don't forget to catch some exceptions here\n$transactionResponse = $transaction-\u003esend();\n\nvar_dump($transactionResponse-\u003eisSuccessful());\n\n//Keep your transaction reference if you want to perform refunds later\nvar_dump($transactionResponse-\u003egetTransactionReference());\n\n//As a side-effect, the card gets stored on the Econtext server for you.\nvar_dump($transactionResponse-\u003egetCardReference());\n```\n\n\n### Purchase using a previously stored Card\n\n```php\n$cardReference = 'from createCard / $transactionResponse-\u003egetCardReference()';\n\n$transaction = $gateway-\u003epurchase(array(\n\t'cardReference' =\u003e $cardReference,\n\t'amount' =\u003e 500,\n\t'description' =\u003e 'Noodles',\n));\n\n//Don't forget to catch some exceptions here\n$transactionResponse = $transaction-\u003esend();\n\nvar_dump($transactionResponse-\u003eisSuccessful());\n\n//Keep your transaction reference if you want to perform refunds later\nvar_dump($transactionResponse-\u003egetTransactionReference());\n```\n\n\n### Purchase in a safe/idempotent way\n\n```php\n$transactionReference = 'your-custom-transaction-reference';\n//You can also easily generate safe/random ones like this:\n//$transactionReference = $gateway-\u003epurchase()-\u003egetTransactionReference();\n\n$transaction = $gateway-\u003epurchase(array(\n\t'transactionReference' =\u003e $transactionReference,\n\t'cardReference' =\u003e $cardReference,\n\t'amount' =\u003e 500,\n\t'description' =\u003e 'Noodles',\n));\n\n//Don't forget to catch other potential exceptions below\ntry {\n\t$transactionResponse = $transaction-\u003esend();\n} catch (\\Omnipay\\Econtext\\Exception\\BadTransactionReferenceException $e) {\n\t//The transactionReference you've provided is either a bad one,\n\t//or this transaction had already been processed.\n\t//Unfortunately, we don't know which, but if you're using references\n\t//generated by this library, it's safe to say this is indeed a duplicate.\n}\n\nvar_dump($transactionResponse-\u003eisSuccessful());\n```\n\n\n### Refund a purchase\n\n```php\n$transactionReference = 'from purchase / $transactionResponse-\u003egetTransactionReference()';\n\n$transaction = $gateway-\u003erefund(array(\n\t'transactionReference' =\u003e $transactionReference,\n));\n\n//Don't forget to catch some exceptions here\n//NOT idempotent - subsequent refund() calls will fail\n$transactionResponse = $transaction-\u003esend();\n\nvar_dump($transactionResponse-\u003eisSuccessful());\n```\n\n\n## Support\n\nIf you are having general issues with Omnipay, we suggest posting on\n[Stack Overflow](http://stackoverflow.com/). Be sure to add the\n[omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.\n\nIf you want to keep up to date with release anouncements, discuss ideas for the project,\nor ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which\nyou can subscribe to.\n\nIf you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/devture/omnipay-econtext/issues),\nor better yet, fork the library and submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevture%2Fomnipay-econtext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevture%2Fomnipay-econtext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevture%2Fomnipay-econtext/lists"}