diff --git a/app/confg.php b/app/confg.php index b78280a..8f372ff 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'); diff --git a/app/routes/anpay.php b/app/routes/anpay.php index a3cb695..437d5f7 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,33 @@ 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" + ), + "vat_code" => "4", + "payment_mode" => "full_prepayment", + "payment_subject" => "commodity" + ) + ) + ), 'capture' => true, - 'description' => $name, + 'description' => $buy['pricename'], ); $id = uniqid('', true); diff --git a/app/views/anpdf3.phtml b/app/views/anpdf3.phtml index 99755ea..f94c8be 100644 --- a/app/views/anpdf3.phtml +++ b/app/views/anpdf3.phtml @@ -3,12 +3,12 @@ pageNum = =$pagenum?>, category = =$category?>, baseurl ='=$baseurl?>', - url = '=$pdfile?>', + url = '=$pdfile?>?ver=1', pageRendering = false, pageNumPending = null, - nexturl = '=$nexturl?>', - newcurr ='=$newcurr?>', - prevurl = '=$prevurl?>'; + nexturl = '=$nexturl?>?ver=1', + newcurr ='=$newcurr?>?ver=1', + prevurl = '=$prevurl?>?ver=1';
@@ -16,7 +16,7 @@ Получайте «Газету на @email» - =$downtitle?> + =$downtitle?>