From f3e25a41008b85366ed5809cc605656f7374e08c Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Thu, 11 Nov 2021 19:06:56 +0000 Subject: [PATCH 1/9] new data kassa --- app/confg.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/confg.php b/app/confg.php index b78280a..2c75998 100644 --- a/app/confg.php +++ b/app/confg.php @@ -37,8 +37,11 @@ define('ONMAIL', 'ak@argumenti.ru'); // куда отправить письмо /* тестовый магазин ЮКАССА */ //if (SITE == 'http://vklan.argumenti.ru/'){ - define('YID', '767032'); // магазин АН - define('YKEY', 'live_fS8znRxo23zYD9I3rkeH3yDYhtpQmh3i5Lbf73QCW3I'); + //define('YID', '767032'); // магазин АН + //define('YKEY', 'live_fS8znRxo23zYD9I3rkeH3yDYhtpQmh3i5Lbf73QCW3I'); + + define('YID', '845164'); // магазин АН + define('YKEY', 'live_ONSXcCxVU10UZtzHdR59io7oZ5N4ZbCNXqw_RrxNxE4'); //} //else { // define('YID', '812455'); From b7ffe9f3a5fe49b5ef545ebd80f951e83ae3701d Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Thu, 11 Nov 2021 19:41:40 +0000 Subject: [PATCH 2/9] old market on confg.php --- app/confg.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/confg.php b/app/confg.php index 2c75998..24a7960 100644 --- a/app/confg.php +++ b/app/confg.php @@ -37,11 +37,11 @@ define('ONMAIL', 'ak@argumenti.ru'); // куда отправить письмо /* тестовый магазин ЮКАССА */ //if (SITE == 'http://vklan.argumenti.ru/'){ - //define('YID', '767032'); // магазин АН - //define('YKEY', 'live_fS8znRxo23zYD9I3rkeH3yDYhtpQmh3i5Lbf73QCW3I'); + define('YID', '767032'); // магазин АН + define('YKEY', 'live_fS8znRxo23zYD9I3rkeH3yDYhtpQmh3i5Lbf73QCW3I'); - define('YID', '845164'); // магазин АН - define('YKEY', 'live_ONSXcCxVU10UZtzHdR59io7oZ5N4ZbCNXqw_RrxNxE4'); + //define('YID', '845164'); // магазин АН + //define('YKEY', 'live_ONSXcCxVU10UZtzHdR59io7oZ5N4ZbCNXqw_RrxNxE4'); //} //else { // define('YID', '812455'); From 599998e83d7dc5302f4d3d9d24e09e4dbe51c143 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Thu, 11 Nov 2021 21:14:05 +0000 Subject: [PATCH 3/9] Update magazine confg.php --- app/confg.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/confg.php b/app/confg.php index 24a7960..8f372ff 100644 --- a/app/confg.php +++ b/app/confg.php @@ -37,11 +37,11 @@ define('ONMAIL', 'ak@argumenti.ru'); // куда отправить письмо /* тестовый магазин ЮКАССА */ //if (SITE == 'http://vklan.argumenti.ru/'){ - define('YID', '767032'); // магазин АН - define('YKEY', 'live_fS8znRxo23zYD9I3rkeH3yDYhtpQmh3i5Lbf73QCW3I'); + // define('YID', '767032'); // магазин АН +// define('YKEY', 'live_fS8znRxo23zYD9I3rkeH3yDYhtpQmh3i5Lbf73QCW3I'); - //define('YID', '845164'); // магазин АН - //define('YKEY', 'live_ONSXcCxVU10UZtzHdR59io7oZ5N4ZbCNXqw_RrxNxE4'); + define('YID', '845164'); // магазин АН + define('YKEY', 'live_ONSXcCxVU10UZtzHdR59io7oZ5N4ZbCNXqw_RrxNxE4'); //} //else { // define('YID', '812455'); From a4409dcbb091887d13caa9d5f20f9c95e84c7d8e Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Tue, 14 Dec 2021 20:40:10 +0000 Subject: [PATCH 4/9] add ver = 1 --- app/views/anpdf3.phtml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/anpdf3.phtml b/app/views/anpdf3.phtml index 99755ea..057a156 100644 --- a/app/views/anpdf3.phtml +++ b/app/views/anpdf3.phtml @@ -3,12 +3,12 @@ pageNum = , category = , baseurl ='', - url = '', + url = '?ver=1', pageRendering = false, pageNumPending = null, - nexturl = '', - newcurr ='', - prevurl = ''; + nexturl = '?ver=1', + newcurr ='?ver=1', + prevurl = '?ver=1';

From c5ae43e87f723eb8b054228eb830e26d8624fb9f Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Tue, 14 Dec 2021 20:44:25 +0000 Subject: [PATCH 5/9] add ver=1 fullpdf --- app/views/anpdf3.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/anpdf3.phtml b/app/views/anpdf3.phtml index 057a156..f94c8be 100644 --- a/app/views/anpdf3.phtml +++ b/app/views/anpdf3.phtml @@ -16,7 +16,7 @@ Получайте «Газету на @email» - + From f1115f428bf6647a81e35b7cf38d8de2d4846fc0 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Sat, 25 Dec 2021 15:15:59 +0000 Subject: [PATCH 6/9] add receipt --- app/routes/anpay.php | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/app/routes/anpay.php b/app/routes/anpay.php index a3cb695..803f961 100644 --- a/app/routes/anpay.php +++ b/app/routes/anpay.php @@ -13,6 +13,7 @@ function anpay_kuri($order_id){ `buy_id`, `buy_status`, `pricename`, + `buy_email`, `anbuy`.`price` as `currprice` FROM `anbuy` @@ -43,7 +44,7 @@ function anpay_kuri($order_id){ $return_url = SITE.'status/'.$buy_id['buy_id']; # получить ссылку на оплату - $payment = yk_pay($buy_id['currprice'], $buy_id['pricename'], $return_url); + $payment = yk_pay($buy_id, $return_url); if (isset($payment['confirmation']['confirmation_url'])){ $pay_url = $payment['confirmation']['confirmation_url']; @@ -142,7 +143,7 @@ function resultpay_kuri(){ } - function yk_pay($price, $name, $return_url = ''){ + function yk_pay($buy, $return_url = ''){ if ($return_url == '') $return_url = SITE; @@ -153,15 +154,32 @@ function resultpay_kuri(){ $items = array( 'amount' => array( - 'value' => $price, + 'value' => $buy['currprice'], 'currency' => 'RUB', ), 'confirmation' => array( 'type' => 'redirect', 'return_url' => $return_url, ), + "receipt" => array( + "customer" => array( + "email" => $buy['buy_email'], + ), + "items" => array( + array( + "description" => $buy['pricename'], + "quantity" => "1.00", + "amount" => array( + "value" => $buy['currprice'], + "currency" => "RUB" + ), + "payment_mode" => "full_prepayment", + "payment_subject" => "commodity" + ) + ) + ), 'capture' => true, - 'description' => $name, + 'description' => $buy['pricename'], ); $id = uniqid('', true); From c61252c70dab97bd39952947ebed241e0f4d3c90 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Sat, 25 Dec 2021 15:22:51 +0000 Subject: [PATCH 7/9] add vat_code --- app/routes/anpay.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/routes/anpay.php b/app/routes/anpay.php index 803f961..c16c7e8 100644 --- a/app/routes/anpay.php +++ b/app/routes/anpay.php @@ -173,6 +173,7 @@ function resultpay_kuri(){ "value" => $buy['currprice'], "currency" => "RUB" ), + "vat_code" => "2", "payment_mode" => "full_prepayment", "payment_subject" => "commodity" ) From 0be1cf113903f4edae1258420266de1af7d2b260 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Sat, 25 Dec 2021 16:07:55 +0000 Subject: [PATCH 8/9] correct vat_code --- app/routes/anpay.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/anpay.php b/app/routes/anpay.php index c16c7e8..437d5f7 100644 --- a/app/routes/anpay.php +++ b/app/routes/anpay.php @@ -173,7 +173,7 @@ function resultpay_kuri(){ "value" => $buy['currprice'], "currency" => "RUB" ), - "vat_code" => "2", + "vat_code" => "4", "payment_mode" => "full_prepayment", "payment_subject" => "commodity" ) From acf7024ef47d9e2dcca9a08c08aee42d56541f42 Mon Sep 17 00:00:00 2001 From: Andrey Kuvshinov Date: Thu, 3 Feb 2022 15:15:10 +0000 Subject: [PATCH 9/9] correct gramm formula --- app/routes/order.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/routes/order.php b/app/routes/order.php index 511bd51..78935c9 100644 --- a/app/routes/order.php +++ b/app/routes/order.php @@ -48,7 +48,7 @@ function checkout_kuri($priceslug, $delivery_id = 1){ } else { $price = $price_id['offline_price']; // бумажный прайс - $delivery = delivery_list(); // список доставок для бумажной версии + $delivery = delivery_list($price_id['weight']); // список доставок для бумажной версии } @@ -308,17 +308,26 @@ function status_kuri($order_id){ } -function delivery_list() { +function delivery_list($weight = 250) { $result = []; $delivery = db_get("SELECT * FROM delivery WHERE delivery_id > 1"); foreach ($delivery as $del){ - + $key = $del['delivery_id']; $result[$key] = $del; + if ($del['delivery_id'] == 4){ + if ($weight > 250){ + $result[$key]['delivery_price'] = 450; + } + + } + + + } return $result;