From b13a82efafcf25af4f787dad972dedabd731e674 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Tue, 17 Sep 2019 16:22:53 +0530 Subject: [PATCH] Issue #1258, Invoice creation after paypal --- packages/Webkul/Paypal/src/Helpers/Ipn.php | 4 ++-- packages/Webkul/Paypal/src/Http/routes.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/Webkul/Paypal/src/Helpers/Ipn.php b/packages/Webkul/Paypal/src/Helpers/Ipn.php index 215a82063..8a0f7257c 100755 --- a/packages/Webkul/Paypal/src/Helpers/Ipn.php +++ b/packages/Webkul/Paypal/src/Helpers/Ipn.php @@ -105,9 +105,9 @@ class Ipn */ protected function processOrder() { - if ($this->post['payment_status'] == 'completed') { + if ($this->post['payment_status'] == 'Completed') { if ($this->post['mc_gross'] != $this->order->grand_total) { - + } else { $this->orderRepository->update(['status' => 'processing'], $this->order->id); diff --git a/packages/Webkul/Paypal/src/Http/routes.php b/packages/Webkul/Paypal/src/Http/routes.php index 8c0a20b6a..819e96b3f 100755 --- a/packages/Webkul/Paypal/src/Http/routes.php +++ b/packages/Webkul/Paypal/src/Http/routes.php @@ -8,9 +8,9 @@ Route::group(['middleware' => ['web']], function () { Route::get('/success', 'Webkul\Paypal\Http\Controllers\StandardController@success')->name('paypal.standard.success'); Route::get('/cancel', 'Webkul\Paypal\Http\Controllers\StandardController@cancel')->name('paypal.standard.cancel'); - - Route::get('/ipn', 'Webkul\Paypal\Http\Controllers\StandardController@ipn')->name('paypal.standard.ipn'); - - Route::post('/ipn', 'Webkul\Paypal\Http\Controllers\StandardController@ipn')->name('paypal.standard.ipn'); }); }); + +Route::get('paypal/standard/ipn', 'Webkul\Paypal\Http\Controllers\StandardController@ipn')->name('paypal.standard.ipn'); + +Route::post('paypal/standard/ipn', 'Webkul\Paypal\Http\Controllers\StandardController@ipn')->name('paypal.standard.ipn');