orders->get_order((int)$order_id); $payment_method = $this->payment->get_payment_method($order->payment_method_id); $payment_currency = $this->money->get_currency(intval($payment_method->currency_id)); $settings = $this->payment->get_payment_settings($payment_method->id); $price = round($this->money->convert($order->total_price, $payment_method->currency_id, false), 2); // описание заказа // order description $desc = 'Оплата заказа №'.$order->id; // Способ оплаты $paymode = $settings['pay2pay_paymode']; $success_url = $this->config->root_url.'/order/'; $result_url = $this->config->root_url.'/payment/Pay2Pay/callback.php'; $currency = $payment_currency->code; if ($currency == 'RUR') $currency = 'RUB'; $xml = " 1.2 ".$settings['pay2pay_merchantid']." ru $order->id $price $currency $desc $result_url $success_url $success_url"; if ($settings['pay2pay_testmode'] == '1') $xml .= "1"; $xml .= ""; $xml_encoded = base64_encode($xml); $merc_sign = $settings['pay2pay_secret']; $sign_encoded = base64_encode(md5($merc_sign.$xml.$merc_sign)); $button = '
'. ''. ''. ''. '
'; return $button; } }