From 2ff63c8d0d4147e6f83eedd403e42ac8fc0cd4ab Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Fri, 31 Jan 2025 23:26:52 +0800 Subject: [PATCH] Debug approve payment problem --- .../paymentsBilling/elements/PaymentVerificationComponent.vue | 2 +- routes/transaction.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/assets/vue/components/paymentsBilling/elements/PaymentVerificationComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/PaymentVerificationComponent.vue index 8e73e5a3..fbf6cc66 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/PaymentVerificationComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/PaymentVerificationComponent.vue @@ -210,7 +210,7 @@ methods: { approvePayment(status){ this.isLoading = true; - this.submit(this.route('api.transaction.payment.approval', this.item.id, status), 'post', 'identificationVerificationSection', true, true); + this.submit(this.route('api.transaction.payment.approval', this.item.id, status), 'put', 'identificationVerificationSection', true, true); }, }, mixins: [componentHandler, staticFormHandler] diff --git a/routes/transaction.php b/routes/transaction.php index ab12b882..7b39290c 100644 --- a/routes/transaction.php +++ b/routes/transaction.php @@ -20,8 +20,7 @@ Route::group(['prefix' => 'transactions', 'namespace' => 'Transactions', 'as' => Route::group(['prefix' => 'payment', 'as' => 'payment.'], function () { Route::post('/create', 'CreatePaymentTransactionController@create')->name('create'); Route::post('/upload-verification-document/{transaction_id}', 'UploadPaymentVerificationDocumentController@upload')->name('verification.create'); - // Route::put('/approve/{transaction_id}/{status}', 'ApprovePaymentTransactionController@approve')->where('status', 'approve|reject')->name('approval'); - Route::post('/approve/{transaction_id}/{status}', 'ApprovePaymentTransactionController@approve')->where('status', 'approve|reject')->name('approval'); + Route::put('/approve/{transaction_id}/{status}', 'ApprovePaymentTransactionController@approve')->where('status', 'approve|reject')->name('approval'); }); Route::group(['prefix' => 'invoice', 'as' => 'invoice.'], function () {