From fa30570e38cf2f21655abe3fc3d89a61a833f8e4 Mon Sep 17 00:00:00 2001 From: Azfar Arsyad <45238748+Arpax17@users.noreply.github.com> Date: Tue, 22 Mar 2022 14:14:18 +0800 Subject: [PATCH 01/41] update package --- composer.json | 4 +- composer.lock | 229 ++++++++++++++++++++++++++------------------------ 2 files changed, 122 insertions(+), 111 deletions(-) diff --git a/composer.json b/composer.json index d4d20a88..6c0c5c04 100644 --- a/composer.json +++ b/composer.json @@ -8,9 +8,9 @@ "php": "^7.3|^8.0", "barryvdh/laravel-dompdf": "^0.9.0", "fruitcake/laravel-cors": "^2.0", - "guzzlehttp/guzzle": "^7.0.1", + "guzzlehttp/guzzle": "^7.4", "intervention/image": "^2.7", - "jomweb/billplz": "4.1", + "jomweb/billplz": "^4.4", "laravel/framework": "^8.65", "laravel/sanctum": "^2.13", "laravel/tinker": "^2.5", diff --git a/composer.lock b/composer.lock index 3ec90ca5..2ac71203 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2e5f0f0a7cad0c224615bb48a86d6a1b", + "content-hash": "19afa9eb7e1656eb3f55bbf757c7b260", "packages": [ { "name": "asm89/stack-cors", @@ -190,16 +190,16 @@ }, { "name": "clue/stream-filter", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/clue/stream-filter.git", - "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320" + "reference": "d6169430c7731d8509da7aecd0af756a5747b78e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/clue/stream-filter/zipball/aeb7d8ea49c7963d3b581378955dbf5bc49aa320", - "reference": "aeb7d8ea49c7963d3b581378955dbf5bc49aa320", + "url": "https://api.github.com/repos/clue/stream-filter/zipball/d6169430c7731d8509da7aecd0af756a5747b78e", + "reference": "d6169430c7731d8509da7aecd0af756a5747b78e", "shasum": "" }, "require": { @@ -210,12 +210,12 @@ }, "type": "library", "autoload": { - "psr-4": { - "Clue\\StreamFilter\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "Clue\\StreamFilter\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -240,7 +240,7 @@ ], "support": { "issues": "https://github.com/clue/stream-filter/issues", - "source": "https://github.com/clue/stream-filter/tree/v1.5.0" + "source": "https://github.com/clue/stream-filter/tree/v1.6.0" }, "funding": [ { @@ -252,7 +252,7 @@ "type": "github" } ], - "time": "2020-10-02T12:38:20+00:00" + "time": "2022-02-21T13:15:14+00:00" }, { "name": "dflydev/dot-access-data", @@ -836,16 +836,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.0", + "version": "7.4.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "868b3571a039f0ebc11ac8f344f4080babe2cb94" + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/868b3571a039f0ebc11ac8f344f4080babe2cb94", - "reference": "868b3571a039f0ebc11ac8f344f4080babe2cb94", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", "shasum": "" }, "require": { @@ -854,7 +854,7 @@ "guzzlehttp/psr7": "^1.8.3 || ^2.1", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2" + "symfony/deprecation-contracts": "^2.2 || ^3.0" }, "provide": { "psr/http-client-implementation": "1.0" @@ -878,12 +878,12 @@ } }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -940,7 +940,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.0" + "source": "https://github.com/guzzle/guzzle/tree/7.4.2" }, "funding": [ { @@ -956,7 +956,7 @@ "type": "tidelift" } ], - "time": "2021-10-18T09:52:00+00:00" + "time": "2022-03-20T14:16:28+00:00" }, { "name": "guzzlehttp/promises", @@ -985,12 +985,12 @@ } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1044,16 +1044,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.1.0", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72" + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72", - "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", "shasum": "" }, "require": { @@ -1077,7 +1077,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.2-dev" } }, "autoload": { @@ -1139,7 +1139,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.1.0" + "source": "https://github.com/guzzle/psr7/tree/2.2.1" }, "funding": [ { @@ -1155,7 +1155,7 @@ "type": "tidelift" } ], - "time": "2021-10-06T17:43:30+00:00" + "time": "2022-03-20T21:55:58+00:00" }, { "name": "http-interop/http-factory-guzzle", @@ -1350,34 +1350,35 @@ }, { "name": "jomweb/billplz", - "version": "v4.1.0", + "version": "v4.4.0", "source": { "type": "git", "url": "https://github.com/jomweb/billplz.git", - "reference": "6449dcbb1b89fd9d98c1d68235b3801b1dc4ee25" + "reference": "7b8fdde601155106df007edbcf2d36bf77822aae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jomweb/billplz/zipball/6449dcbb1b89fd9d98c1d68235b3801b1dc4ee25", - "reference": "6449dcbb1b89fd9d98c1d68235b3801b1dc4ee25", + "url": "https://api.github.com/repos/jomweb/billplz/zipball/7b8fdde601155106df007edbcf2d36bf77822aae", + "reference": "7b8fdde601155106df007edbcf2d36bf77822aae", "shasum": "" }, "require": { - "jomweb/ringgit": "^2.1", - "laravie/codex": "^5.1", - "laravie/codex-filter": "^1.0", - "php": ">=7.2", + "jomweb/ringgit": "^2.3.1", + "laravie/codex": "^5.3.3", + "laravie/codex-filter": "^1.2.2", + "php": "^7.2 || ^8.0", "php-http/multipart-stream-builder": "^1.0" }, "require-dev": { - "mockery/mockery": "^1.3.1", - "php-http/curl-client": "^2.0", - "phpunit/phpunit": "^8.4 || ^9.0" + "mockery/mockery": "~1.3.1 || ^1.4.4", + "php-http/guzzle7-adapter": "^1.0", + "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10 || ^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.x-dev" } }, "autoload": { @@ -1398,9 +1399,19 @@ "description": "PHP Agnostic library for working with BillPlz API", "support": { "issues": "https://github.com/jomweb/billplz/issues", - "source": "https://github.com/jomweb/billplz/tree/4.x" + "source": "https://github.com/jomweb/billplz/tree/v4.4.0" }, - "time": "2020-02-17T14:15:32+00:00" + "funding": [ + { + "url": "https://paypal.me/crynobone", + "type": "custom" + }, + { + "url": "https://liberapay.com/crynobone", + "type": "liberapay" + } + ], + "time": "2022-02-08T03:36:54+00:00" }, { "name": "jomweb/ringgit", @@ -1822,40 +1833,40 @@ }, { "name": "laravie/codex", - "version": "v5.3.2", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/laravie/codex.git", - "reference": "07fbd9ffd09303b4964d305ad0c2bc738327def7" + "reference": "5434e8e33d008d3cf177dfa27b227d46995f97ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravie/codex/zipball/07fbd9ffd09303b4964d305ad0c2bc738327def7", - "reference": "07fbd9ffd09303b4964d305ad0c2bc738327def7", + "url": "https://api.github.com/repos/laravie/codex/zipball/5434e8e33d008d3cf177dfa27b227d46995f97ec", + "reference": "5434e8e33d008d3cf177dfa27b227d46995f97ec", "shasum": "" }, "require": { - "laravie/codex-common": "^1.4.3", + "laravie/codex-common": "^1.5.1", "php": "^7.2 || ^8.0" }, "require-dev": { "guzzlehttp/guzzle": "^7.0.1", - "laravie/codex-filter": "^1.2.1", + "laravie/codex-filter": "^1.2.2", "mockery/mockery": "^1.3.1", "php-http/guzzle7-adapter": "^1.0", "php-http/multipart-stream-builder": "^1.0", - "phpstan/phpstan": "^0.12.90", - "phpunit/phpunit": "^8.4 || ^9.3.3" + "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10" }, "suggest": { - "laravie/codex-filter": "Content filtering for Laravie Codex (^1.0)", + "laravie/codex-filter": "Content filtering for Laravie Codex (^1.2.2)", "php-http/multipart-stream-builder": "Allow to send multipart form request (^1.0)", - "phpunit/phpunit": "Allow to use Codex Faker request during testing (^8.4 || ^9.0)" + "phpunit/phpunit": "Allow to use Codex Faker request during testing (^8.5.21 || ^9.5.10)" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.x-dev" + "dev-master": "6.x-dev" } }, "autoload": { @@ -1876,7 +1887,7 @@ "description": "PHP library for building API Client SDK for PHP", "support": { "issues": "https://github.com/laravie/codex/issues", - "source": "https://github.com/laravie/codex/tree/v5.3.2" + "source": "https://github.com/laravie/codex/tree/v5.3.3" }, "funding": [ { @@ -1888,20 +1899,20 @@ "type": "liberapay" } ], - "time": "2021-08-01T14:35:33+00:00" + "time": "2022-02-08T03:05:53+00:00" }, { "name": "laravie/codex-common", - "version": "v1.5.0", + "version": "v1.5.1", "source": { "type": "git", "url": "https://github.com/laravie/codex-common.git", - "reference": "c843dcc1aefd326251d3415f3d74db1da2213e3e" + "reference": "5eaa8bfc457b5c0a07c4663d7c2828244c9058a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravie/codex-common/zipball/c843dcc1aefd326251d3415f3d74db1da2213e3e", - "reference": "c843dcc1aefd326251d3415f3d74db1da2213e3e", + "url": "https://api.github.com/repos/laravie/codex-common/zipball/5eaa8bfc457b5c0a07c4663d7c2828244c9058a6", + "reference": "5eaa8bfc457b5c0a07c4663d7c2828244c9058a6", "shasum": "" }, "require": { @@ -1923,9 +1934,9 @@ "autoload": { "psr-4": { "Laravie\\Codex\\Common\\": "src/Common/", + "Laravie\\Codex\\Testing\\": "src/Testing/", "Laravie\\Codex\\Contracts\\": "src/Contracts/", - "Laravie\\Codex\\Exceptions\\": "src/Exceptions/", - "Laravie\\Codex\\Testing\\": "src/Testing/" + "Laravie\\Codex\\Exceptions\\": "src/Exceptions/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1941,7 +1952,7 @@ "description": "Common PHP library for building API Client SDK for PHP", "support": { "issues": "https://github.com/laravie/codex-common/issues", - "source": "https://github.com/laravie/codex-common/tree/v1.5.0" + "source": "https://github.com/laravie/codex-common/tree/v1.5.1" }, "funding": [ { @@ -1953,32 +1964,32 @@ "type": "liberapay" } ], - "time": "2022-01-06T03:05:05+00:00" + "time": "2022-02-08T02:29:24+00:00" }, { "name": "laravie/codex-filter", - "version": "v1.2.1", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/laravie/codex-filter.git", - "reference": "a902b7ce2faef50ca97508569900a96488a35a9e" + "reference": "0ff6a2556cb71e8080f1b92b82aa54630424d57b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravie/codex-filter/zipball/a902b7ce2faef50ca97508569900a96488a35a9e", - "reference": "a902b7ce2faef50ca97508569900a96488a35a9e", + "url": "https://api.github.com/repos/laravie/codex-filter/zipball/0ff6a2556cb71e8080f1b92b82aa54630424d57b", + "reference": "0ff6a2556cb71e8080f1b92b82aa54630424d57b", "shasum": "" }, "require": { "igorw/get-in": "^1.0", - "laravie/codex-common": "^1.4", + "laravie/codex-common": "^1.5.1", "php": "^7.2 || ^8.0" }, "require-dev": { - "mockery/mockery": "^1.3.1", - "php-http/guzzle7-adapter": "^0.1", - "phpstan/phpstan": "0.12.x-dev", - "phpunit/phpunit": "^8.4 || ^9.3.3" + "mockery/mockery": "~1.3.1 || ^1.4.4", + "php-http/guzzle7-adapter": "^1.0", + "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10" }, "type": "library", "extra": { @@ -2004,7 +2015,7 @@ "description": "Content filtering for Laravie Codex", "support": { "issues": "https://github.com/laravie/codex-filter/issues", - "source": "https://github.com/laravie/codex-filter/tree/v1.2.1" + "source": "https://github.com/laravie/codex-filter/tree/v1.2.2" }, "funding": [ { @@ -2016,7 +2027,7 @@ "type": "liberapay" } ], - "time": "2021-08-01T13:57:49+00:00" + "time": "2022-02-08T02:38:37+00:00" }, { "name": "league/commonmark", @@ -3338,16 +3349,16 @@ }, { "name": "php-http/httplug", - "version": "2.2.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/php-http/httplug.git", - "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9" + "reference": "f640739f80dfa1152533976e3c112477f69274eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/191a0a1b41ed026b717421931f8d3bd2514ffbf9", - "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9", + "url": "https://api.github.com/repos/php-http/httplug/zipball/f640739f80dfa1152533976e3c112477f69274eb", + "reference": "f640739f80dfa1152533976e3c112477f69274eb", "shasum": "" }, "require": { @@ -3394,22 +3405,22 @@ ], "support": { "issues": "https://github.com/php-http/httplug/issues", - "source": "https://github.com/php-http/httplug/tree/master" + "source": "https://github.com/php-http/httplug/tree/2.3.0" }, - "time": "2020-07-13T15:43:23+00:00" + "time": "2022-02-21T09:52:22+00:00" }, { "name": "php-http/message", - "version": "1.12.0", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "39eb7548be982a81085fe5a6e2a44268cd586291" + "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/39eb7548be982a81085fe5a6e2a44268cd586291", - "reference": "39eb7548be982a81085fe5a6e2a44268cd586291", + "url": "https://api.github.com/repos/php-http/message/zipball/7886e647a30a966a1a8d1dad1845b71ca8678361", + "reference": "7886e647a30a966a1a8d1dad1845b71ca8678361", "shasum": "" }, "require": { @@ -3426,7 +3437,7 @@ "ext-zlib": "*", "guzzlehttp/psr7": "^1.0", "laminas/laminas-diactoros": "^2.0", - "phpspec/phpspec": "^5.1 || ^6.3", + "phpspec/phpspec": "^5.1 || ^6.3 || ^7.1", "slim/slim": "^3.0" }, "suggest": { @@ -3442,12 +3453,12 @@ } }, "autoload": { - "psr-4": { - "Http\\Message\\": "src/" - }, "files": [ "src/filters.php" - ] + ], + "psr-4": { + "Http\\Message\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3468,9 +3479,9 @@ ], "support": { "issues": "https://github.com/php-http/message/issues", - "source": "https://github.com/php-http/message/tree/1.12.0" + "source": "https://github.com/php-http/message/tree/1.13.0" }, - "time": "2021-08-29T09:13:12+00:00" + "time": "2022-02-11T13:41:14+00:00" }, { "name": "php-http/message-factory", @@ -4803,16 +4814,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", "shasum": "" }, "require": { @@ -4821,7 +4832,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.4-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -4850,7 +4861,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" }, "funding": [ { @@ -4866,7 +4877,7 @@ "type": "tidelift" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2021-07-12T14:48:14+00:00" }, { "name": "symfony/error-handler", @@ -5510,16 +5521,16 @@ }, { "name": "symfony/options-resolver", - "version": "v5.4.0", + "version": "v5.4.3", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "b0fb78576487af19c500aaddb269fd36701d4847" + "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/b0fb78576487af19c500aaddb269fd36701d4847", - "reference": "b0fb78576487af19c500aaddb269fd36701d4847", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/cc1147cb11af1b43f503ac18f31aa3bec213aba8", + "reference": "cc1147cb11af1b43f503ac18f31aa3bec213aba8", "shasum": "" }, "require": { @@ -5559,7 +5570,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.0" + "source": "https://github.com/symfony/options-resolver/tree/v5.4.3" }, "funding": [ { @@ -5575,7 +5586,7 @@ "type": "tidelift" } ], - "time": "2021-11-23T10:19:22+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/polyfill-ctype", From 5728b8826014c6b3c075ff2a63a1e24e7365f4ea Mon Sep 17 00:00:00 2001 From: Azfar Arsyad <45238748+Arpax17@users.noreply.github.com> Date: Tue, 22 Mar 2022 18:17:51 +0800 Subject: [PATCH 02/41] Update ApiController.php --- app/Http/Controllers/ApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php index 3d307469..ff8ef693 100644 --- a/app/Http/Controllers/ApiController.php +++ b/app/Http/Controllers/ApiController.php @@ -165,7 +165,7 @@ class ApiController extends Controller 'Bayaran Borang', ['redirect_url' => route('pay.paymentStatus')] ); - // dd($response); + dd($response); $previous_siri = Resit::orderBy('id','desc')->first(); if($previous_siri){ $nosiri = $previous_siri->id + 1; From 555a4b061fbc4d9659627a28ec6e543027ff0582 Mon Sep 17 00:00:00 2001 From: Azfar Arsyad <45238748+Arpax17@users.noreply.github.com> Date: Tue, 22 Mar 2022 18:20:18 +0800 Subject: [PATCH 03/41] Update ApiController.php --- app/Http/Controllers/ApiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php index ff8ef693..a438761e 100644 --- a/app/Http/Controllers/ApiController.php +++ b/app/Http/Controllers/ApiController.php @@ -165,7 +165,7 @@ class ApiController extends Controller 'Bayaran Borang', ['redirect_url' => route('pay.paymentStatus')] ); - dd($response); + // dd($response); $previous_siri = Resit::orderBy('id','desc')->first(); if($previous_siri){ $nosiri = $previous_siri->id + 1; @@ -174,7 +174,7 @@ class ApiController extends Controller } $billcode = $response->toArray(); - // dd($billcode); + dd($billcode); // $billcode['redirect_url'] = 'http://192.168.0.10:8003/api/pembayaran/response'; // dd($billcode); $reference_no = 'LPKB' . $day . $month . $year . sprintf("%08d", $nosiri); From 23059f1b730bd3815eb589a79b1d02c4696ad2b6 Mon Sep 17 00:00:00 2001 From: Azfar Arsyad <45238748+Arpax17@users.noreply.github.com> Date: Tue, 22 Mar 2022 18:25:45 +0800 Subject: [PATCH 04/41] Update ApiController.php --- app/Http/Controllers/ApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php index a438761e..ba01a026 100644 --- a/app/Http/Controllers/ApiController.php +++ b/app/Http/Controllers/ApiController.php @@ -153,7 +153,7 @@ class ApiController extends Controller $year = $current->format('y'); $total_bayaran = 1000; - + dd($request->email); $collection_id = $this->collection_id; $response = $bill->create( $collection_id, From 8798d0286a67d4cb98c3804cac475e80a6a647a3 Mon Sep 17 00:00:00 2001 From: Azfar Arsyad <45238748+Arpax17@users.noreply.github.com> Date: Wed, 23 Mar 2022 09:01:25 +0800 Subject: [PATCH 05/41] Update ApiController.php --- app/Http/Controllers/ApiController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php index ba01a026..dce9ee99 100644 --- a/app/Http/Controllers/ApiController.php +++ b/app/Http/Controllers/ApiController.php @@ -61,9 +61,9 @@ class ApiController extends Controller }else{ $this->api_key = 'f3e82fe1-a422-4660-97f0-65cc59ff6c47'; $this->XSignature_Key = 'S-alZUbzmD2_TF3vmrRqgehQ'; + $this->collection_id = 'drxdyor4'; } - } public function biditem() @@ -153,7 +153,7 @@ class ApiController extends Controller $year = $current->format('y'); $total_bayaran = 1000; - dd($request->email); + $collection_id = $this->collection_id; $response = $bill->create( $collection_id, @@ -174,7 +174,7 @@ class ApiController extends Controller } $billcode = $response->toArray(); - dd($billcode); + // dd($billcode); // $billcode['redirect_url'] = 'http://192.168.0.10:8003/api/pembayaran/response'; // dd($billcode); $reference_no = 'LPKB' . $day . $month . $year . sprintf("%08d", $nosiri); From 92899e43ed5ed7535935d9c094b4d0a3de2a973a Mon Sep 17 00:00:00 2001 From: Azfar Arsyad <45238748+Arpax17@users.noreply.github.com> Date: Wed, 23 Mar 2022 09:18:13 +0800 Subject: [PATCH 06/41] Update AuthController.php --- app/Http/Controllers/AuthMobile/AuthController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/AuthMobile/AuthController.php b/app/Http/Controllers/AuthMobile/AuthController.php index 158d634c..f1c86ef2 100644 --- a/app/Http/Controllers/AuthMobile/AuthController.php +++ b/app/Http/Controllers/AuthMobile/AuthController.php @@ -14,7 +14,8 @@ use Illuminate\Support\Facades\Validator; class AuthController extends Controller { public function register(Request $request) { - $validator = Validator::make($request->all(), [ + dd($request->all); + $validator = Validator::make($request->all(), [ 'name' => 'required|string', 'username' => 'required|string|unique:users', 'nokp' => 'required|string|unique:users', From 7c4778bfcaea7e3067d3e5e56d05bf479146a102 Mon Sep 17 00:00:00 2001 From: faiqahzaman <91926774+faiqahzaman@users.noreply.github.com> Date: Wed, 23 Mar 2022 14:04:59 +0800 Subject: [PATCH 07/41] update --- app/Http/Controllers/MarhunController.php | 79 +++++++++++++---------- 1 file changed, 46 insertions(+), 33 deletions(-) diff --git a/app/Http/Controllers/MarhunController.php b/app/Http/Controllers/MarhunController.php index bc5c882e..7fdc7b57 100644 --- a/app/Http/Controllers/MarhunController.php +++ b/app/Http/Controllers/MarhunController.php @@ -85,25 +85,19 @@ class MarhunController extends Controller // { if($request->karat != $marhun->karat) { - $checkdata = Pengesahan::where('lelongbid_id', $lelongbid->id) - ->whereNull('disahkan_pada') - ->first(); - if($checkdata) - { - // - } - else - { - $karat = new Pengesahan; - $karat->lelong_id = $lelong->id; - $karat->lelongbid_id = $lelongbid->id; - $karat->lelongbidmarhun_id = $marhun->id; - $karat->norujukan = $lelongbid->norujukan; - $karat->diminta_oleh = $user->id; - $karat->diminta_pada = $currentdate; - $karat->status_ubah = 1; - $karat->save(); - } + // $checkdata = Pengesahan::where('lelongbid_id', $lelongbid->id) + // ->whereNull('disahkan_pada') + // ->first(); + + $karat = new Pengesahan; + $karat->lelong_id = $lelong->id; + $karat->lelongbid_id = $lelongbid->id; + $karat->lelongbidmarhun_id = $marhun->id; + $karat->norujukan = $lelongbid->norujukan; + $karat->diminta_oleh = $user->id; + $karat->diminta_pada = $currentdate; + $karat->status_ubah = 1; + $karat->save(); } $bezaberat = $marhun->berat - $request->berat_emas; $bezahargaasas = $marhun->hargaasas - $request->harga_asas; @@ -204,13 +198,14 @@ class MarhunController extends Controller $karat = new Pengesahan; $karat->lelong_id = $lelong->id; $karat->lelongbid_id = $lelongbid->id; + $karat->lelongbidmarhun_id = $lelongbidmarhun->id; $karat->norujukan = $lelongbid->norujukan; $karat->diminta_oleh = $user->id; $karat->diminta_pada = $currentdate; $karat->status_ubah = 2; $karat->save(); - return redirect()->route('marhun.show',$lelongbid->id) + return redirect()->route('marhun.show',[$lelongbid->id,$lelongbid->lelong_id]) ->with('success','Marhun Berjaya Ditambah'); } @@ -300,7 +295,7 @@ class MarhunController extends Controller ->first(); $marhuns = LelongBidMarhun::where('lelongbid_id', $pengesahan->lelongbid_id) - ->where('id', $pengesahan->lelongbidmarhun_id) + // ->where('id', $pengesahan->lelongbidmarhun_id) ->get()->toArray(); $lelongbid = LelongBid::where('id', $pengesahan->lelongbid_id)->first(); @@ -316,19 +311,37 @@ class MarhunController extends Controller $gadaimarhun = GadaiMarhun::where('marhun', $marhun['marhun']) ->where('norujukan', $lelongbid->norujukan) ->first(); + if($gadaimarhun) + { + $karat = $karat->where('karat', $gadaimarhun->karat)->first(); + + $total = $karat->harga * $gadaimarhun->berat; + $hargaasas = round($total); + + $marhuns[$index1]['old_marhun'] = $gadaimarhun->marhun; + $marhuns[$index1]['old_karat'] = $gadaimarhun->karat; + $marhuns[$index1]['old_berat'] = $gadaimarhun->berat; + $marhuns[$index1]['old_harga'] = $karat->harga; + $marhuns[$index1]['old_nilaimarhun'] = $total; + $marhuns[$index1]['old_hargaasas'] = $hargaasas; + $marhuns[$index1]['status_ubah'] = $status; + } + else + { + $karat = $karat->where('karat', $marhun['karat'])->first(); + + $total = $karat->harga * $marhun['berat']; + $hargaasas = round($total); + + $marhuns[$index1]['old_marhun'] = $marhun{'marhun'}; + $marhuns[$index1]['old_karat'] = $marhun['karat']; + $marhuns[$index1]['old_berat'] = $marhun['berat']; + $marhuns[$index1]['old_harga'] = $karat->harga; + $marhuns[$index1]['old_nilaimarhun'] = $total; + $marhuns[$index1]['old_hargaasas'] = $hargaasas; + $marhuns[$index1]['status_ubah'] = $status; + } - $karat = $karat->where('karat', $gadaimarhun->karat)->first(); - - $total = $karat->harga * $gadaimarhun->berat; - $hargaasas = round($total); - - $marhuns[$index1]['old_marhun'] = $gadaimarhun->marhun; - $marhuns[$index1]['old_karat'] = $gadaimarhun->karat; - $marhuns[$index1]['old_berat'] = $gadaimarhun->berat; - $marhuns[$index1]['old_harga'] = $karat->harga; - $marhuns[$index1]['old_nilaimarhun'] = $total; - $marhuns[$index1]['old_hargaasas'] = $hargaasas; - $marhuns[$index1]['status_ubah'] = $status; } return view('pengesahan.mutumarhun', compact('marhuns', 'lelongbid', 'pengesahan_id', 'norujukan', 'id')); } From 6e707821f2c00f9d241d65e1b8e2776be3e63ebc Mon Sep 17 00:00:00 2001 From: Azfar Arsyad <45238748+Arpax17@users.noreply.github.com> Date: Wed, 23 Mar 2022 14:09:10 +0800 Subject: [PATCH 08/41] update billplz api --- routes/api.php | 5 +---- routes/web.php | 7 +++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/routes/api.php b/routes/api.php index 840818f0..bc9fa257 100644 --- a/routes/api.php +++ b/routes/api.php @@ -32,13 +32,10 @@ Route::post('/password/email', [ForgotPasswordController::class, 'sendResetLinkE // Route::get('/callback', [ApiController::class, 'feepayment']); Route::post('/feepayment', [ApiController::class, 'feepayment'])->name('feepayment'); -Route::get('/pembayaran/response', [ApiController::class, 'response'])->name('pay.paymentStatus'); -Route::get('/pembayaran/backend', [ApiController::class, 'callback'])->name('pay.callback'); + Route::post('/bidpayment', [ApiController::class, 'bidpayment'])->name('bidpayment'); -Route::get('/pembayaran/bidresponse', [ApiController::class, 'bidresponse'])->name('pay.bidpaymentStatus'); -Route::get('/pembayaran/bidbackend', [ApiController::class, 'bidbackend'])->name('pay.bidcallback'); //Protected routes Route::group(['middleware' => ['auth:sanctum']], function () { diff --git a/routes/web.php b/routes/web.php index 2dfb140b..3e980ad9 100644 --- a/routes/web.php +++ b/routes/web.php @@ -28,6 +28,13 @@ Auth::routes(); Route::get('/home','HomeController@index')->name('home'); Route::get('/about','HomeController@about')->name('about'); +Route::get('/pembayaran/response','ApiController@response')->name('pay.paymentStatus'); +Route::get('/pembayaran/backend','ApiController@callback')->name('pay.callback'); + + +Route::get('/pembayaran/bidresponse', 'ApiController@bidresponse')->name('pay.bidpaymentStatus'); +Route::get('/pembayaran/bidbackend', 'ApiController@bidbackend')->name('pay.bidcallback'); + //Pengurusan Pengguna From ed89b0c66590f62ff9e8f44f49e2f42203b5c4b5 Mon Sep 17 00:00:00 2001 From: faiqahzaman <91926774+faiqahzaman@users.noreply.github.com> Date: Wed, 23 Mar 2022 15:35:19 +0800 Subject: [PATCH 09/41] update kemaskini marhun --- app/Http/Controllers/MarhunController.php | 32 +++++++++-------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/app/Http/Controllers/MarhunController.php b/app/Http/Controllers/MarhunController.php index bc5c882e..ba53100b 100644 --- a/app/Http/Controllers/MarhunController.php +++ b/app/Http/Controllers/MarhunController.php @@ -85,25 +85,19 @@ class MarhunController extends Controller // { if($request->karat != $marhun->karat) { - $checkdata = Pengesahan::where('lelongbid_id', $lelongbid->id) - ->whereNull('disahkan_pada') - ->first(); - if($checkdata) - { - // - } - else - { - $karat = new Pengesahan; - $karat->lelong_id = $lelong->id; - $karat->lelongbid_id = $lelongbid->id; - $karat->lelongbidmarhun_id = $marhun->id; - $karat->norujukan = $lelongbid->norujukan; - $karat->diminta_oleh = $user->id; - $karat->diminta_pada = $currentdate; - $karat->status_ubah = 1; - $karat->save(); - } + // $checkdata = Pengesahan::where('lelongbid_id', $lelongbid->id) + // ->whereNull('disahkan_pada') + // ->first(); + + $karat = new Pengesahan; + $karat->lelong_id = $lelong->id; + $karat->lelongbid_id = $lelongbid->id; + $karat->lelongbidmarhun_id = $marhun->id; + $karat->norujukan = $lelongbid->norujukan; + $karat->diminta_oleh = $user->id; + $karat->diminta_pada = $currentdate; + $karat->status_ubah = 1; + $karat->save(); } $bezaberat = $marhun->berat - $request->berat_emas; $bezahargaasas = $marhun->hargaasas - $request->harga_asas; From 81e6a5b8081d1a89b5b3601fdea7d46db3e92515 Mon Sep 17 00:00:00 2001 From: faiqahzaman <91926774+faiqahzaman@users.noreply.github.com> Date: Thu, 24 Mar 2022 15:21:53 +0800 Subject: [PATCH 10/41] pengesahan, view marhun pengesahan mutu marhun & view details marhun --- app/Http/Controllers/MarhunController.php | 106 ++++++++++-------- .../views/pengesahan/mutumarhun.blade.php | 46 ++++---- .../pengesahan/perubahanmutumarhun.blade.php | 22 ++-- routes/web.php | 2 +- 4 files changed, 96 insertions(+), 80 deletions(-) diff --git a/app/Http/Controllers/MarhunController.php b/app/Http/Controllers/MarhunController.php index ba53100b..ec2a661e 100644 --- a/app/Http/Controllers/MarhunController.php +++ b/app/Http/Controllers/MarhunController.php @@ -267,69 +267,79 @@ class MarhunController extends Controller public function sahubahmutu($id) { - // dd($request->all()); + $mutumarhun = Lelong::join('pengesahan', 'lelong.id', '=', 'pengesahan.lelong_id') ->where('lelong.id', $id) ->whereNull('disahkan_oleh') - ->select( - 'pengesahan.disahkan_oleh', - 'pengesahan.id as pengesahan_id', - 'pengesahan.norujukan', - 'lelong.id', - 'lelong.tarikh_lelong', - 'lelong.harga_emas_asas', - 'lelong.jbg', - 'lelong.cajlelong' - ) - ->get(); - - return view('pengesahan.perubahanmutumarhun', compact('mutumarhun', 'id')); - } - - public function mutumarhun($pengesahan_id, $norujukan, $id) - { - $pengesahan = Pengesahan::where('id', $pengesahan_id) - ->where('lelong_id', $id) - ->where('norujukan', $norujukan) - ->first(); - - $marhuns = LelongBidMarhun::where('lelongbid_id', $pengesahan->lelongbid_id) - ->where('id', $pengesahan->lelongbidmarhun_id) + ->selectRaw('count(*) as total, sum(status) as tstat,norujukan') + ->groupBy('pengesahan.norujukan') ->get()->toArray(); - $lelongbid = LelongBid::where('id', $pengesahan->lelongbid_id)->first(); - $karat = Lelkarat::where('lelong_id', $id)->get(); + // foreach($mutumarhun as $index1=>$marhun) + // { + // $pengesahan = Pengesahan::where('lelong_id', $id) + // ->where('norujukan', $marhun['norujukan']) + // ->select('id as pengesahan_id') + // ->get(); - foreach($marhuns as $index1=>$marhun) - { - $status = Pengesahan::where('id', $pengesahan_id) - ->where('lelongbid_id', $marhun['lelongbid_id']) - ->select('status_ubah') - ->value('status_ubah'); + // $mutumarhun[$index1]['pengesahan_id'] = $pengesahan; + // } - $gadaimarhun = GadaiMarhun::where('marhun', $marhun['marhun']) - ->where('norujukan', $lelongbid->norujukan) - ->first(); + return view('pengesahan.perubahanmutumarhun', compact('mutumarhun', 'id')); - $karat = $karat->where('karat', $gadaimarhun->karat)->first(); + } - $total = $karat->harga * $gadaimarhun->berat; - $hargaasas = round($total); + public function mutumarhun($norujukan, $id) + { + $pengesahans = Pengesahan::where('lelong_id', $id) + ->where('norujukan', $norujukan) + ->get(); + + $arraypengesahan = []; + foreach($pengesahans as $pengesahan) + { + // dd($pengesahan); + $marhuns = LelongBidMarhun::where('lelongbid_id', $pengesahan->lelongbid_id) + ->where('id', $pengesahan->lelongbidmarhun_id) + ->get()->toArray(); + + $lelongbid = LelongBid::where('id', $pengesahan->lelongbid_id)->first(); + $karat = Lelkarat::where('lelong_id', $id)->get(); + + foreach($marhuns as $index1=>$marhun) + { + $status = Pengesahan::where('id', $pengesahan->id) + ->where('lelongbid_id', $marhun['lelongbid_id']) + ->select('status_ubah') + ->value('status_ubah'); + + $gadaimarhun = GadaiMarhun::where('marhun', $marhun['marhun']) + ->where('norujukan', $lelongbid->norujukan) + ->first(); + + $karat = $karat->where('karat', $gadaimarhun->karat)->first(); + + $total = $karat->harga * $gadaimarhun->berat; + $hargaasas = round($total); + + $marhuns[$index1]['old_marhun'] = $gadaimarhun->marhun; + $marhuns[$index1]['old_karat'] = $gadaimarhun->karat; + $marhuns[$index1]['old_berat'] = $gadaimarhun->berat; + $marhuns[$index1]['old_harga'] = $karat->harga; + $marhuns[$index1]['old_nilaimarhun'] = $total; + $marhuns[$index1]['old_hargaasas'] = $hargaasas; + $marhuns[$index1]['status_ubah'] = $status; + } - $marhuns[$index1]['old_marhun'] = $gadaimarhun->marhun; - $marhuns[$index1]['old_karat'] = $gadaimarhun->karat; - $marhuns[$index1]['old_berat'] = $gadaimarhun->berat; - $marhuns[$index1]['old_harga'] = $karat->harga; - $marhuns[$index1]['old_nilaimarhun'] = $total; - $marhuns[$index1]['old_hargaasas'] = $hargaasas; - $marhuns[$index1]['status_ubah'] = $status; + array_push($arraypengesahan,$marhuns); } - return view('pengesahan.mutumarhun', compact('marhuns', 'lelongbid', 'pengesahan_id', 'norujukan', 'id')); + + return view('pengesahan.mutumarhun', compact('lelongbid', 'norujukan', 'id', 'arraypengesahan', 'marhuns')); } public function terimaperubahan(Request $request) { - // dd($request->all()); + dd($request->all()); //update mutu marhun - gadaimarhun $user = Auth::user(); diff --git a/resources/views/pengesahan/mutumarhun.blade.php b/resources/views/pengesahan/mutumarhun.blade.php index 33b9ff82..a7309b2b 100644 --- a/resources/views/pengesahan/mutumarhun.blade.php +++ b/resources/views/pengesahan/mutumarhun.blade.php @@ -6,7 +6,7 @@