{"id":20927264,"url":"https://github.com/fergusdixon/payfast-sdk-php","last_synced_at":"2026-05-17T11:34:18.074Z","repository":{"id":62504163,"uuid":"144857427","full_name":"fergusdixon/payfast-sdk-php","owner":"fergusdixon","description":"A PHP handler for making requests to Payfast","archived":false,"fork":false,"pushed_at":"2018-09-27T08:25:21.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-07-29T01:26:20.451Z","etag":null,"topics":["mit-license","payfast","payment-gateway","payments","php","sdk"],"latest_commit_sha":null,"homepage":"","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/fergusdixon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-15T13:34:56.000Z","updated_at":"2019-09-05T12:17:24.000Z","dependencies_parsed_at":"2022-11-02T12:30:33.911Z","dependency_job_id":null,"html_url":"https://github.com/fergusdixon/payfast-sdk-php","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/fergusdixon/payfast-sdk-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fergusdixon%2Fpayfast-sdk-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fergusdixon%2Fpayfast-sdk-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fergusdixon%2Fpayfast-sdk-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fergusdixon%2Fpayfast-sdk-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fergusdixon","download_url":"https://codeload.github.com/fergusdixon/payfast-sdk-php/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fergusdixon%2Fpayfast-sdk-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33136806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["mit-license","payfast","payment-gateway","payments","php","sdk"],"created_at":"2024-11-18T20:47:11.377Z","updated_at":"2026-05-17T11:34:18.047Z","avatar_url":"https://github.com/fergusdixon.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# payfast-sdk-php\n![MIT License](https://img.shields.io/github/license/fergusdixon/payfast-sdk-php.svg)\n![Travis Build Status](https://travis-ci.com/fergusdixon/payfast-sdk-php.svg?branch=dev)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d6158e0262a84d67927b771d12dd9d77)](https://www.codacy.com/project/fergusdixon101/payfast-sdk-php/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=fergusdixon/payfast-sdk-php\u0026amp;utm_campaign=Badge_Grade_Dashboard)\n[![StyleCI](https://github.styleci.io/repos/144857427/shield?branch=dev)](https://github.styleci.io/repos/144857427)\n[![codecov](https://codecov.io/gh/fergusdixon/payfast-sdk-php/branch/dev/graph/badge.svg?token=h18LyV3ueg)](https://codecov.io/gh/fergusdixon/payfast-sdk-php)\n![Packagist Version](https://img.shields.io/packagist/v/fergusdixon/payfast-sdk-php.svg)\n\nA PHP handler for making requests to documented [PayFast](https://www.payfast.co.za) endpoints.\n\nSee their [docs](https://developers.payfast.co.za/documentation/)\n\n## Features\n- [x] CI tools\n- [x] Handle [signature generation](https://developers.payfast.co.za/documentation/#api-signature-generation)\n- [x] Generate Timestamp\n- [x] Make user defined requests\n- [ ] Support R0 verification charges\n- [x] Error handling\n- [ ] Built in functions\n  - [ ] Ping\n  - [ ] Transaction History\n  - [ ] Query Card Transaction\n  - [ ] Subscriptions\n    - [ ] Charge Subscription\n    - [ ] Fetch Subscription Info\n    - [ ] Pause Subscription\n    - [ ] Unpause Subscription\n    - [ ] Cancel Subscription\n    \n## Usage\nThis PayFast SDK requires config variables passed to it. \n\n`merchantId` and `passPhrase` are mandatory, if not defined other fields will default to values shown below:\n\n```php\n$config = [\n    'merchantId' =\u003e 'testId',               // Required\n    'passPhrase' =\u003e 'testPhrase',           // Required\n    'endpoint' =\u003e '//api.payfast.co.za',\n    'port' =\u003e 443,\n    'ssl' =\u003e true,\n    'testing' =\u003e false,\n];\n\n$payfast = new PayFastSDK($config);\n```\n\n### Custom Requests\nYou can create a request to any endpoint in PayFast using `$payfast-\u003erequest-\u003ecustomRequest($verb, $method, $options)`\n\nFor example, getting [Transaction History](https://developers.payfast.co.za/documentation/#transaction-history)\n```php\n$verb = 'GET';\n$method = '/history';\n$options = [\n    'from' =\u003e '2018-02-01',\n    'to' =\u003e '2018-03-04',\n];\n$response = $payfast-\u003erequest-\u003ecustomRequest($verb, $method, $options)\n```\n\n## Quirks\n\n### Signature Generation\nPayfast requires a MD5 hash of the alphabetised submitted variables, header and body variables, as well as the passphrase to ensure the request has not been tampered with.\n\n### Testing\nPayfast provides a [sandbox environment](https://sandbox.payfast.co.za/) to test integrations.\n\nTest requests are sent to the normal endpoint, but append `?testing=true` to the URI.\n\n## Acknowledgements\n- Add yourself here!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffergusdixon%2Fpayfast-sdk-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffergusdixon%2Fpayfast-sdk-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffergusdixon%2Fpayfast-sdk-php/lists"}