{"id":21445208,"url":"https://github.com/revenuemonster/rm-php-sdk","last_synced_at":"2025-09-01T17:47:32.410Z","repository":{"id":38328121,"uuid":"163794438","full_name":"RevenueMonster/rm-php-sdk","owner":"RevenueMonster","description":"Revenue Monster PHP SDK","archived":false,"fork":false,"pushed_at":"2024-09-27T09:09:30.000Z","size":223,"stargazers_count":4,"open_issues_count":4,"forks_count":11,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-08-26T15:32:29.082Z","etag":null,"topics":["ai","apiv3","payment","php","rm","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/RevenueMonster.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-02T04:36:18.000Z","updated_at":"2024-09-27T09:09:00.000Z","dependencies_parsed_at":"2023-02-09T17:30:35.878Z","dependency_job_id":"64f3b238-e08d-4ed9-b0b1-78d24076f81f","html_url":"https://github.com/RevenueMonster/rm-php-sdk","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/RevenueMonster/rm-php-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueMonster%2Frm-php-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueMonster%2Frm-php-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueMonster%2Frm-php-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueMonster%2Frm-php-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RevenueMonster","download_url":"https://codeload.github.com/RevenueMonster/rm-php-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RevenueMonster%2Frm-php-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273166935,"owners_count":25057178,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ai","apiv3","payment","php","rm","sdk"],"created_at":"2024-11-23T02:24:52.758Z","updated_at":"2025-09-01T17:47:32.362Z","avatar_url":"https://github.com/RevenueMonster.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RevenueMonster PHP SDK\n\n## 🪣 Minimum Requirements\n\n- [php8](https://www.php.net/releases/8.0/en.php)\n- [composer](https://getcomposer.org/) - A PHP package manager\n\n## 🔨 Installation\n\n```console\ncomposer require revenuemonster/sdk\n```\n\n## 📻 Legacy Support\n\n- If you using `php5.7`, please refer to branch [php5.7](https://github.com/RevenueMonster/rm-php-sdk/tree/php5.6)\n- If you using `php7`, please refer to branch [php7](https://github.com/RevenueMonster/rm-php-sdk/tree/php7)\n\n## ✨ Covered Functions\n\n- [x] Client Credentials (Authentication)\n- [x] Refresh Token (Authentication)\n- [x] Get Merchant Profile\n- [x] Get Merchant Subscriptions\n- [x] Get Stores\n- [x] Get Stores By ID\n- [x] Create Store\n- [x] Update Store\n- [x] Delete Store\n- [x] Get User Profile\n- [x] Payment (Transaction QR) - Create Transaction QRCode/URL\n- [x] Payment (Transaction QR) - Get Transaction QRCode/URL\n- [x] Payment (Transaction QR) - Get Transaction QRCode/URL By Code\n- [x] Payment (Transaction QR) - Get Transactions By Code\n- [x] Payment (Quick Pay) - Payment\n- [x] Payment (Quick Pay) - Refund\n- [x] Payment (Quick Pay) - Reverse\n- [x] Payment (Quick Pay) - Get All Payment Transactions\n- [x] Payment (Quick Pay) - Get All Payment Transaction By ID\n- [ ] Payment (Quick Pay) - Daily Settlement Report\n- [x] Payment (Checkout) - Create Web/Mobile Payment (New UI support)\n- [ ] Give Loyalty Point\n- [ ] Get Loyalty Members\n- [ ] Get Loyalty Member\n- [ ] Get Loyalty Member Point History\n- [ ] Issue Voucher\n- [ ] Void Voucher\n- [ ] Get Voucher By Code\n- [ ] Get Voucher Batches\n- [ ] Get Voucher Batch By Key\n- [ ] Send Notification (Merchant)\n- [ ] Send Notification (Store)\n- [ ] Send Notification (User)\n- [x] eKYC - Mykad Prediction\n- [x] eKYC - Face Verification\n\n## 📝 Examples\n\n```php\nrequire __DIR__.'/vendor/autoload.php';\n\nuse RevenueMonster\\SDK\\RevenueMonster;\nuse RevenueMonster\\SDK\\Exceptions\\ApiException;\nuse RevenueMonster\\SDK\\Exceptions\\ValidationException;\nuse RevenueMonster\\SDK\\Request\\WebPayment;\nuse RevenueMonster\\SDK\\Request\\QRPay;\nuse RevenueMonster\\SDK\\Request\\QuickPay;\n\n// Initialise sdk instance\n$rm = new RevenueMonster([\n  'clientId' =\u003e '5499912462549392881',\n  'clientSecret' =\u003e 'pwMapjZzHljBALIGHxfGGXmiGLxjWbkT',\n  'privateKey' =\u003e file_get_contents(__DIR__.'/private_key.pem'),\n  'isSandbox' =\u003e false,\n]);\n\n// Get merchant profile\ntry {\n  $response = $rm-\u003emerchant-\u003eprofile();\n} catch(ApiException $e) {\n  echo \"statusCode : {$e-\u003egetCode()}, errorCode : {$e-\u003egetErrorCode()}, errorMessage : {$e-\u003egetMessage()}\";\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n\n// Get merchant subscriptions\ntry {\n  $response = $rm-\u003emerchant-\u003esubscriptions();\n} catch(ApiException $e) {\n  echo \"statusCode : {$e-\u003egetCode()}, errorCode : {$e-\u003egetErrorCode()}, errorMessage : {$e-\u003egetMessage()}\";\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n\n// Get merchant's stores\ntry {\n  $response = $rm-\u003estore-\u003epaginate(10);\n} catch(ApiException $e) {\n  echo \"statusCode : {$e-\u003egetCode()}, errorCode : {$e-\u003egetErrorCode()}, errorMessage : {$e-\u003egetMessage()}\";\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n\n// Get transactions by QR Code\ntry {\n  $qrCode = '732eb1e935983d274695f250dee9eb75';\n  $response = $rm-\u003epayment-\u003etransactionsByQrCode($qrCode);\n} catch(ApiException $e) {\n  echo \"statusCode : {$e-\u003egetCode()}, errorCode : {$e-\u003egetErrorCode()}, errorMessage : {$e-\u003egetMessage()}\";\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n\n// Get transactions\ntry {\n  $response = $rm-\u003epayment-\u003epaginate(5);\n} catch(ApiException $e) {\n  echo \"statusCode : {$e-\u003egetCode()}, errorCode : {$e-\u003egetErrorCode()}, errorMessage : {$e-\u003egetMessage()}\";\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n\n// Find transaction by transaction id\ntry {\n  $transactionId = '100922222732432874823';\n  $response = $rm-\u003epayment-\u003efind($transactionId);\n} catch(ApiException $e) {\n  echo \"statusCode : {$e-\u003egetCode()}, errorCode : {$e-\u003egetErrorCode()}, errorMessage : {$e-\u003egetMessage()}\";\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n\n// Find transaction by order id\ntry {\n  $orderId = '1234';\n  $response = $rm-\u003epayment-\u003efindByOrderId($orderId);\n} catch(ApiException $e) {\n  echo \"statusCode : {$e-\u003egetCode()}, errorCode : {$e-\u003egetErrorCode()}, errorMessage : {$e-\u003egetMessage()}\";\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n\n// create QR pay\ntry {\n  $qrPay = new QRPay();\n  $qrPay-\u003ecurrencyType = 'MYR';\n  $qrPay-\u003eamount = 100;\n  $qrPay-\u003eisPreFillAmount = true;\n  $qrPay-\u003eorder-\u003etitle = '服务费';\n  $qrPay-\u003eorder-\u003edetail = 'testing';\n  $qrPay-\u003emethod = [];\n  $qrPay-\u003eredirectUrl = 'https://shop.v1.mamic.asia/app/index.php?i=6\u0026c=entry\u0026m=ewei_shopv2\u0026do=mobile\u0026r=order.pay_rmwxpay.complete\u0026openid=ot3NT0dxs4A8h4sVZm-p7q_MUTtQ\u0026fromwechat=1';\n  $qrPay-\u003estoreId = '1553067342153519097';\n  $qrPay-\u003etype = 'DYNAMIC';\n  $response = $rm-\u003epayment-\u003eqrPay($qrPay);\n} catch(ApiException $e) {\n  echo \"statusCode : {$e-\u003egetCode()}, errorCode : {$e-\u003egetErrorCode()}, errorMessage : {$e-\u003egetMessage()}\";\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n\n// create Web payment\ntry {\n  $wp = new WebPayment;\n  $wp-\u003eorder-\u003eid = '10020';\n  $wp-\u003eorder-\u003etitle = 'Testing Web Payment';\n  $wp-\u003eorder-\u003ecurrencyType = 'MYR';\n  $wp-\u003eorder-\u003eamount = 100;\n  $wp-\u003eorder-\u003edetail = '';\n  $wp-\u003eorder-\u003eadditionalData = '';\n  $wp-\u003estoreId = \"1553067342153519097\";\n  $wp-\u003eredirectUrl = 'https://google.com';\n  $wp-\u003enotifyUrl = 'https://google.com';\n  $wp-\u003elayoutVersion = 'v1';\n\n  $response = $rm-\u003epayment-\u003ecreateWebPayment($wp);\n  echo $response-\u003echeckoutId; // Checkout ID\n  echo $response-\u003eurl; // Payment gateway url\n} catch(ApiException $e) {\n  echo \"statusCode : {$e-\u003egetCode()}, errorCode : {$e-\u003egetErrorCode()}, errorMessage : {$e-\u003egetMessage()}\";\n} catch(ValidationException $e) {\n  var_dump($e-\u003egetMessage());\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n\n// create Quick pay\ntry {\n  $qp = new QuickPay;\n  $qp-\u003eauthCode = '281011026026517778602435';\n  $qp-\u003eorder-\u003eid = '443';\n  $qp-\u003eorder-\u003etitle = '【原味系列】 猫山王榴';\n  $qp-\u003eorder-\u003ecurrencyType = 'MYR';\n  $qp-\u003eorder-\u003eamount = 10;\n  $qp-\u003eorder-\u003edetail = '';\n  $qp-\u003eorder-\u003eadditionalData = 'SH20190819100656262762';\n  $qp-\u003eipAddress = '8.8.8.8';\n  $qp-\u003estoreId = \"1553067342153519097\";\n\n  $response = $rm-\u003epayment-\u003equickPay($qp);\n} catch(ApiException $e) {\n  echo \"statusCode : {$e-\u003egetCode()}, errorCode : {$e-\u003egetErrorCode()}, errorMessage : {$e-\u003egetMessage()}\";\n} catch(ValidationException $e) {\n  var_dump($e-\u003egetMessage());\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n```\n\n## eKYC Module\n\nThe Revenue Monster eKYC (Electronic Know Your Customer) module provides features to complete the onboarding experience.\n\nAll the methods in this module accepts only the data portion in a base64 data url.\n\nFor example, you might have a base64 string as below, just send us the data part.\n\n```\nFormat - data:[\u003cmediatype\u003e][;base64],\u003cdata\u003e\n\nExample - data:image/jpeg;base64,/9j/4AAQSkZJRgABAQE......\n\nData Portion - /9j/4AAQSkZJRgABAQE......\n```\n\n### eKYC MyKad\n\nThis method will accept a mykad image and return a request ID to be used in the liveness SDK.\n\n```php\ntry {\n  $mykad = new EkycMyKad();\n  $mykad-\u003ebase64Image = file_get_contents(__DIR__.'/mykad.txt');\n  $response = $rm-\u003eekyc-\u003ecall($mykad);\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n```\n\n### Face Verification\n\nThis method will recognize and verify if the human face present on 2 images are the same person or not.\n\n```php\ntry {\n  $image = file_get_contents(__DIR__.'/face.txt');\n  $face = new VerifyFace();\n  $face-\u003ebase64Image1 = $image;    // image 1\n  $face-\u003ebase64Image2 = $image;    // image 2\n  $response = $rm-\u003eekyc-\u003ecall($face);\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n```\n\n### Get eKYC Result\n\nThis method accepts the `ekycId` parameter returned from the Liveness SDK. It will return the complete eKYC result.\n\n```php\ntry {\n  $request = new EkycGetResult();\n  $request-\u003eid = \"62201d52239b18052126e289\";\n  $ekycResult = $rm-\u003eekyc-\u003ecall($request);\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n```\n\n### Get MyKad Result\n\nThis method accepts the `id` parameter returned from the `EkycMyKad` method, or `mykadRequestId` parameter from the `EkycGetResult` method. It will return the complete data recognized from the MyKad.\n\n```php\ntry {\n  $request = new EkycGetMyKadResult();\n  $request-\u003eid = $ekycResult-\u003emykadRequestId;\n  $response = $rm-\u003eekyc-\u003ecall($request);\n} catch(Exception $e) {\n  echo $e-\u003egetMessage();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevenuemonster%2Frm-php-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frevenuemonster%2Frm-php-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frevenuemonster%2Frm-php-sdk/lists"}