{"id":23114187,"url":"https://github.com/buibr/budget-sms-php","last_synced_at":"2025-08-16T20:31:48.563Z","repository":{"id":34480256,"uuid":"179639289","full_name":"buibr/budget-sms-php","owner":"buibr","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-07T08:26:30.000Z","size":44,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-20T17:15:51.788Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buibr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-05T07:45:42.000Z","updated_at":"2024-04-05T09:59:28.000Z","dependencies_parsed_at":"2022-08-08T01:01:09.222Z","dependency_job_id":null,"html_url":"https://github.com/buibr/budget-sms-php","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buibr%2Fbudget-sms-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buibr%2Fbudget-sms-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buibr%2Fbudget-sms-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buibr%2Fbudget-sms-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buibr","download_url":"https://codeload.github.com/buibr/budget-sms-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230056275,"owners_count":18165899,"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-12-17T03:20:18.989Z","updated_at":"2024-12-17T03:20:21.105Z","avatar_url":"https://github.com/buibr.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# budget-sms-php\r\n\r\n\u003ch4\u003eInstall with composer\u003c/h4\u003e\r\n\r\n```terminal\r\ncomposer require buibr/budget-sms-php\r\n```\r\n\r\n### Usage:\r\n\r\n###### Example 1:\r\n```php\r\n$budget = new \\buibr\\Budget\\BudgetSMS( [\r\n    'username'=\u003e'xxx',\r\n    'userid'=\u003e 'xxx',\r\n    'handle'=\u003e'xxx',\r\n]);\r\n\r\n//  sender name\r\n$budget-\u003esetSender(\"Test\");\r\n\r\n//  add recepient\r\n$budget-\u003esetRecipient('+38971xxxxxx');\r\n\r\n//  add message\r\n$budget-\u003esetMessage('Testing the provider');\r\n\r\n//  Send the message \r\n$send = $budget-\u003esend();\r\n\r\n```\r\n\r\n######  Example 2:\r\n```php\r\nuse buibr\\Budget\\BudgetSMS;\r\n\r\n$budget = new BudgetSMS( [\r\n    'username'=\u003e'xxx',\r\n    'userid'=\u003e 'xxx',\r\n    'handle'=\u003e'xxx',\r\n    'from'=\u003e'Test',\r\n    'price'=\u003e 1, // optional\r\n    'mccmnc'=\u003e 1, // optional\r\n    'credit'=\u003e 1, // optional\r\n]);\r\n\r\n$send = $budget-\u003esend( '+38971xxxxxx', 'message content' );\r\n\r\n```\r\n\r\n\r\n### Response examples:\r\n\r\n###### Success:\r\n```php\r\nbuibr\\Budget\\BudgetResponse Object\r\n(\r\n    [code] =\u003e 200\r\n    [type] =\u003e text/plain; charset=UTF-8\r\n    [time] =\u003e 0.494388\r\n    [status] =\u003e 1\r\n    [response] =\u003e Array\r\n        (\r\n            [transaction] =\u003e 76208843\r\n            [price] =\u003e 0.02\r\n            [time] =\u003e 1\r\n            [mccmnc] =\u003e 29401\r\n            [credit] =\u003e 590.5892\r\n        )\r\n\r\n    [data] =\u003e OK 76208843 0.02 1 29401 590.5892\r\n)\r\n```\r\n\r\n###### Error:\r\n```php\r\nbuibr\\Budget\\BudgetResponse Object\r\n(\r\n    [code] =\u003e 200\r\n    [type] =\u003e text/plain; charset=UTF-8\r\n    [time] =\u003e 0.32309\r\n    [status] =\u003e \r\n    [response] =\u003e SMS message text is empty\r\n    [data] =\u003e ERR 2001\r\n)\r\n```\r\n\r\n### Push DLR Handler (webhook to accept requests):\r\n\r\n###### Request: \r\n```php \r\n$budget = new BudgetSMS;\r\n$dlr = $budget-\u003epushDlr( $payload );\r\n```\r\n\r\n###### Response:\r\n```php \r\nArray\r\n(\r\n    [code] =\u003e \r\n    [type] =\u003e \r\n    [time] =\u003e \r\n    [status] =\u003e \r\n    [smsid] =\u003e xxx\r\n    [sms_code] =\u003e 7\r\n    [sms_message] =\u003e SMSC error, message could not be processed\r\n)\r\n```\r\n\r\n### Pull DLR Handler:\r\n\r\n###### Request\r\n```php \r\n$budget = new BudgetSMS( [\r\n    'username'=\u003e'xxx',\r\n    'userid'=\u003e 'xxx',\r\n    'handle'=\u003e'xxx',\r\n]);\r\n$dlr = $budget-\u003epullDLR('xxxx');\r\n```\r\n\r\n###### Response\r\n\r\n```php \r\nArray\r\n(\r\n    [code] =\u003e 200\r\n    [type] =\u003e text/html; charset=UTF-8\r\n    [time] =\u003e 0.261374\r\n    [status] =\u003e \r\n    [smsid] =\u003e xxx\r\n    [sms_code] =\u003e 8\r\n    [sms_message] =\u003e Message not allowed\r\n    [data] =\u003e OK 8\r\n)\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuibr%2Fbudget-sms-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuibr%2Fbudget-sms-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuibr%2Fbudget-sms-php/lists"}