From 6bfd731aada856ef20cf4a3fd40633f35da25132 Mon Sep 17 00:00:00 2001 From: Hamed Date: Fri, 1 Nov 2019 20:26:05 +0330 Subject: [PATCH 01/14] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7d019108..0f5d2da0 100644 --- a/README.md +++ b/README.md @@ -72,10 +72,10 @@ php artisan vendor:publish + + // then chose : GatewayServiceProviderLaravel6 - -
-سپس این گزینه را انتخاب کنید : "Larabookir\Gateway\GatewayServiceProviderLaravel6" +
From b24608af26d681b38191d973659906991175c566 Mon Sep 17 00:00:00 2001 From: Hamed Date: Fri, 1 Nov 2019 20:26:33 +0330 Subject: [PATCH 02/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f5d2da0..39421ea0 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ php artisan vendor:publish - // then chose : GatewayServiceProviderLaravel6 + // then choose : GatewayServiceProviderLaravel6
From 0deeb54cbbcc4bf83e13e896abae3a5e90d7a3de Mon Sep 17 00:00:00 2001 From: Hamed Date: Fri, 1 Nov 2019 20:27:42 +0330 Subject: [PATCH 03/14] Update README.md --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 39421ea0..dccb00fc 100644 --- a/README.md +++ b/README.md @@ -63,18 +63,22 @@ برای لاراول ۵ :
+```php - php artisan vendor:publish --provider=Larabookir\Gateway\GatewayServiceProviderLaravel5 +php artisan vendor:publish --provider=Larabookir\Gateway\GatewayServiceProviderLaravel5 +```
برای لاراول ۶ به بعد :
+```php + php artisan vendor:publish // then choose : GatewayServiceProviderLaravel6 - +```
From 50c489d090bafffbbe17bbd08c0c9e795e37860c Mon Sep 17 00:00:00 2001 From: Hamed Date: Fri, 1 Nov 2019 20:28:54 +0330 Subject: [PATCH 04/14] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dccb00fc..97042fbc 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ برای لاراول ۵ :
+ ```php php artisan vendor:publish --provider=Larabookir\Gateway\GatewayServiceProviderLaravel5 @@ -75,10 +76,11 @@ php artisan vendor:publish --provider=Larabookir\Gateway\GatewayServiceProviderL ```php - php artisan vendor:publish - - // then choose : GatewayServiceProviderLaravel6 +php artisan vendor:publish +// then choose : GatewayServiceProviderLaravel6 + ``` +
From 8037b25fe67c5b06456394b02e8c343ded5e113a Mon Sep 17 00:00:00 2001 From: Hamed Date: Fri, 1 Nov 2019 20:29:48 +0330 Subject: [PATCH 05/14] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 97042fbc..3bf3688c 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ php artisan vendor:publish --provider=Larabookir\Gateway\GatewayServiceProviderL ```php php artisan vendor:publish + // then choose : GatewayServiceProviderLaravel6 ``` @@ -87,7 +88,11 @@ php artisan vendor:publish **مرحله ۴) - ایجاد جداول** - php artisan migrate +```php + +php artisan migrate + +``` From fe057e4e98da986aad35c196c947168b868a2a07 Mon Sep 17 00:00:00 2001 From: Hamed Date: Fri, 1 Nov 2019 20:30:40 +0330 Subject: [PATCH 06/14] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3bf3688c..90f02da2 100644 --- a/README.md +++ b/README.md @@ -84,10 +84,10 @@ php artisan vendor:publish
- - **مرحله ۴) - ایجاد جداول** +
+ ```php php artisan migrate @@ -95,7 +95,8 @@ php artisan migrate ``` - +
+ **مرحله ۵)** عملیات نصب پایان یافته است حال فایل gateway.php را در مسیر app/ را باز نموده و تنظیمات مربوط به درگاه بانکی مورد نظر خود را در آن وارد نمایید . From 909e2fede0d207848ccfed5e12227b75dc06f0a5 Mon Sep 17 00:00:00 2001 From: Hamed Date: Fri, 1 Nov 2019 20:31:50 +0330 Subject: [PATCH 07/14] Update README.md --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 90f02da2..4f9696df 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,17 @@ **مرحله ۱)** - composer require larabook/gateway - +
+ + +```php +composer require larabook/gateway + +``` + +
+ **مرحله ۲)** تغییرات زیر را در فایل config/app.php اعمال نمایید: From b8c5946628f05b1334423395e84da98d7edb3d98 Mon Sep 17 00:00:00 2001 From: Hamed Date: Fri, 1 Nov 2019 20:33:32 +0330 Subject: [PATCH 08/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f9696df..aba279a4 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ php artisan migrate **مرحله ۵)** -عملیات نصب پایان یافته است حال فایل gateway.php را در مسیر app/ را باز نموده و تنظیمات مربوط به درگاه بانکی مورد نظر خود را در آن وارد نمایید . +عملیات نصب پایان یافته است حال فایل gateway.php را در مسیر app/ باز نموده و تنظیمات مربوط به درگاه بانکی مورد نظر خود را در آن وارد نمایید . حال میتوایند برای اتصال به api بانک از یکی از روش های زیر به انتخاب خودتان استفاده نمایید . (Facade , Service container):
From 248d6bf3524c31f4a53f3da056c4a45f7d6d6378 Mon Sep 17 00:00:00 2001 From: hosein abedi Date: Tue, 5 Nov 2019 10:26:06 +0330 Subject: [PATCH 09/14] Fix stupid realese bug --- src/Saman/Saman.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Saman/Saman.php b/src/Saman/Saman.php index 5fa9ccdf..af4e8d97 100644 --- a/src/Saman/Saman.php +++ b/src/Saman/Saman.php @@ -24,11 +24,9 @@ class Saman extends PortAbstract implements PortInterface * @var string */ -// protected $serverVerifyUrl = "https://sep.shaparak.ir/payments/referencepayment.asmx?WSDL"; - protected $serverVerifyUrl = "http://banktest.ir/gateway/saman/payments/referencepayment?wsdl"; + protected $serverVerifyUrl = "https://sep.shaparak.ir/payments/referencepayment.asmx?WSDL"; -// protected $gateUrl = "https://sep.shaparak.ir/Payment.aspx"; - protected $gateUrl = "http://banktest.ir/gateway/saman/gate"; + protected $gateUrl = "https://sep.shaparak.ir/Payment.aspx"; /** * {@inheritdoc} From ee552d2c3be3c15be0d10f720e46df87ae4ec863 Mon Sep 17 00:00:00 2001 From: Hamed Date: Thu, 7 Nov 2019 18:46:02 +0330 Subject: [PATCH 10/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aba279a4..f8caa5b6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ پکیج اتصال به تمامی IPG ها و بانک های ایرانی. این پکیج با ورژن های -( ۴ و ۵ و ۶ لاراول ) +( ۴ و ۵ و ۶ ) لاراول سازگار می باشد From b5865a00a022b23a4e9f6486165ff14ff1d74eff Mon Sep 17 00:00:00 2001 From: Hamed Date: Mon, 2 Mar 2020 17:41:53 +0330 Subject: [PATCH 11/14] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f8caa5b6..8a5040c2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@
-سایت مرجع پکیج: [larabook.ir](http://larabook.ir/اتصال-درگاه-بانک-لاراول/) + +``` +متاسفانه این پکیج دیگر پشتیبانی نمی شود +``` پکیج اتصال به تمامی IPG ها و بانک های ایرانی. From f2bc40dd8840eae10fd7b1f048158cb30244a773 Mon Sep 17 00:00:00 2001 From: Saman Sh999 Date: Tue, 14 Jul 2020 15:10:54 +0430 Subject: [PATCH 12/14] Add new exception code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add in doc version ‫‪1.16‬‬ bank mellat --- src/Mellat/MellatException.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mellat/MellatException.php b/src/Mellat/MellatException.php index 81d02013..309a8611 100644 --- a/src/Mellat/MellatException.php +++ b/src/Mellat/MellatException.php @@ -50,7 +50,9 @@ class MellatException extends BankException 51 => 'تراکنش تکراری است', 54 => 'تراکنش مرجع موجود نیست', 55 => 'تراکنش نامعتبر است', - 61 => 'خطا در واریز' + 61 => 'خطا در واریز', + 62 => 'مسیر بازگشت به سایت در دامنه ثبت شده برای پدیرنده قرار ندارد', + 98 => 'سقف استفاده از رمز ایستا به پایان رسیده است' ); public function __construct($errorId) From 93353d9b079300af79e9aee5bf2a52bf76df99de Mon Sep 17 00:00:00 2001 From: Samsam Date: Thu, 22 Apr 2021 22:03:57 +0430 Subject: [PATCH 13/14] read gateway table name from config in migration --- ...3_add_description_to_gateway_transactions.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/migrations/2018_03_04_224213_add_description_to_gateway_transactions.php b/migrations/2018_03_04_224213_add_description_to_gateway_transactions.php index 036513cc..e8a427e2 100644 --- a/migrations/2018_03_04_224213_add_description_to_gateway_transactions.php +++ b/migrations/2018_03_04_224213_add_description_to_gateway_transactions.php @@ -1,11 +1,16 @@ getTable(), function (Blueprint $table) { $table->text('description')->after('ip')->nullable(); }); } @@ -26,10 +30,8 @@ public function up() */ public function down() { - Schema::table('gateway_transactions', function (Blueprint $table) { - // + Schema::table($this->getTable(), function (Blueprint $table) { $table->dropColumn('description'); - }); } } From b25c64449305f49b6d2c3c151b70d135921af068 Mon Sep 17 00:00:00 2001 From: Saeed Vaziry Date: Sun, 21 Nov 2021 01:19:29 +0400 Subject: [PATCH 14/14] Upgrade Pay.ir to the new API --- src/Payir/Payir.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Payir/Payir.php b/src/Payir/Payir.php index 66328230..2ab9ea2d 100644 --- a/src/Payir/Payir.php +++ b/src/Payir/Payir.php @@ -13,20 +13,21 @@ class Payir extends PortAbstract implements PortInterface * * @var string */ - protected $serverUrl = 'https://pay.ir/payment/send'; + protected $serverUrl = 'https://pay.ir/pg/send'; /** * Address of CURL server for verify payment * * @var string */ - protected $serverVerifyUrl = 'https://pay.ir/payment/verify'; + protected $serverVerifyUrl = 'https://pay.ir/pg/verify'; + /** * Address of gate for redirect * * @var string */ - protected $gateUrl = 'https://pay.ir/payment/gateway/'; + protected $gateUrl = 'https://pay.ir/pg/'; protected $factorNumber; @@ -131,7 +132,7 @@ protected function sendPayRequest() $response = json_decode($response, true); curl_close($ch); if (is_numeric($response['status']) && $response['status'] > 0) { - $this->refId = $response['transId']; + $this->refId = $response['token']; $this->transactionSetRefId(); return true; } @@ -150,15 +151,11 @@ protected function sendPayRequest() protected function userPayment() { $status = Request::input('status'); - $transId = Request::input('transId'); - $this->cardNumber = Request::input('cardNumber'); - $message = Request::input('message'); if (is_numeric($status) && $status > 0) { - $this->trackingCode = $transId; return true; } $this->transactionFailed(); - $this->newLog(-5, $message); + $this->newLog(-5, Enum::TRANSACTION_FAILED_TEXT); throw new PayirReceiveException(-5); } @@ -173,7 +170,7 @@ protected function verifyPayment() { $fields = [ 'api' => $this->config->get('gateway.payir.api'), - 'transId' => $this->refId(), + 'token' => $this->refId(), ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this->serverVerifyUrl); @@ -184,6 +181,8 @@ protected function verifyPayment() $response = json_decode($response, true); curl_close($ch); if ($response['status'] == 1) { + $this->trackingCode = $response['transId']; + $this->cardNumber = $response['cardNumber']; $this->transactionSucceed(); $this->newLog(1, Enum::TRANSACTION_SUCCEED_TEXT); return true;