{"id":15025262,"url":"https://github.com/rafayhingoro/jazzcash","last_synced_at":"2025-10-03T23:32:08.062Z","repository":{"id":192610291,"uuid":"246573427","full_name":"rafayhingoro/jazzcash","owner":"rafayhingoro","description":"Library for Jazzcash Rest API","archived":true,"fork":false,"pushed_at":"2020-06-29T22:51:35.000Z","size":23,"stargazers_count":9,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-28T19:40:57.047Z","etag":null,"topics":["jazzcash","payment","payment-gateway","php","php-7"],"latest_commit_sha":null,"homepage":"https://www.jazzcash.com.pk/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rafayhingoro.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,"governance":null}},"created_at":"2020-03-11T13:06:12.000Z","updated_at":"2024-06-27T13:18:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb1abedc-c719-4c79-b810-57718c707fe4","html_url":"https://github.com/rafayhingoro/jazzcash","commit_stats":null,"previous_names":["rafayhingoro/jazzcash"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafayhingoro%2Fjazzcash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafayhingoro%2Fjazzcash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafayhingoro%2Fjazzcash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafayhingoro%2Fjazzcash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafayhingoro","download_url":"https://codeload.github.com/rafayhingoro/jazzcash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235204448,"owners_count":18952326,"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":["jazzcash","payment","payment-gateway","php","php-7"],"created_at":"2024-09-24T20:01:55.085Z","updated_at":"2025-10-03T23:32:07.702Z","avatar_url":"https://github.com/rafayhingoro.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JazzCash Rest API PHP\n\n#### Pre-Requisites\n- PHP 7.x\n- Curl Extension / Enabled\n\n#### Usage\nAdd these constants to your file\n\u003e Most of these constants can be retrieved from JazzCash Merchant Portal\n```php\n// Merchant ID\ndefine('JC_MERCHANT_ID', \"\");\n// Password (auto generated)\ndefine('JC_PASS', \"\");\n// Integrity Salt (auto generated)\ndefine('JC_SALT', \"\");\n// Change only if URLs are different\ndefine('JC_LIVE_URL', 'https://production.jazzcash.com.pk');\ndefine('JC_SANDBOX_URL', 'https://sandbox.jazzcash.com.pk');\n```\n### 1. Authorize Request\n\n```php\n// include file\nrequire 'jazzcash/jazzcash.php';\n\n// initialize jazzcash rest api library\n$jc = new Jazzcash;\n\n// request type \n$jc-\u003ereqType = 'Authorize';\n// request data\n$jc-\u003eset_data([\n    \"pp_Amount\" =\u003e \"\", // Amount \n    \"pp_InstrToken\" =\u003e \"\", // If saved card/or details otherwise leave empty\n    \"pp_InstrumentType\" =\u003e \"CARD\", // card\n    \"pp_TxnDateTime\"    =\u003e date(\"YmdHisu\"), // transaction date time\n    \"pp_TxnRefNo\" =\u003e \"T\".date('YmdHisu'), // transaction reference no\n    \"pp_Frequency\"          =\u003e \"SINGLE\",\n    \"InstrumentDTO\" =\u003e [\n        \"pp_CustomerCardNumber\" =\u003e \"\", \n        \"pp_CustomerCardExpiry\" =\u003e \"\",\n        \"pp_CustomerCardCvv\"    =\u003e \"\"\n    ],\n]);\n$jc-\u003esend(); // json response\n```\n\n### 2. Capture Request\n```php\n// include file\nrequire 'jazzcash/jazzcash.php';\n\n// initialize jazzcash rest api library\n$jc = new Jazzcash;\n\n// request type \n$jc-\u003ereqType = 'Capture';\n$jc-\u003eset_data([\n    'pp_TxnRefNo' =\u003e '', // transaction number generated from authorized request\n    'pp_Amount'   =\u003e '', // amount sent from authorized request\n]);\n$jc-\u003esend(); // json response\n```\n\n### Refund Request\n```php\n// include file\nrequire 'jazzcash/jazzcash.php';\n\n// initialize jazzcash rest api library\n$jc = new Jazzcash;\n\n// request type \n$jc-\u003ereqType = 'Refund';\n$jc-\u003eset_data([\n    'pp_TxnRefNo' =\u003e '', // transaction number generated from authorized request\n    'pp_Amount'   =\u003e '', // amount sent from authorized request\n]);\n$jc-\u003esend(); // json response\n```\n\n### Payment Inquiry\n```php\n// include file\nrequire 'jazzcash/jazzcash.php';\n\n// initialize jazzcash rest api library\n$jc = new Jazzcash;\n\n// request type \n$jc-\u003ereqType = 'PaymentInquiry';\n$jc-\u003eset_data([\n    'pp_TxnRefNo' =\u003e '', // transaction reference number generated from authorized request\n]);\n```\n\n### Void\n```php\n// include file\nrequire 'jazzcash/jazzcash.php';\n\n// initialize jazzcash rest api library\n$jc = new Jazzcash;\n\n// request type \n$jc-\u003ereqType = 'Void';\n$jc-\u003eset_data([\n    'pp_TxnRefNo' =\u003e '' // transaction reference number generated from authorized request\n]);\n```\n\n\u003e for any bugs or inquiry feel free to report issue in repository or mail bugs@rafayhingoro.me\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafayhingoro%2Fjazzcash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafayhingoro%2Fjazzcash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafayhingoro%2Fjazzcash/lists"}