Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions woocommerce_tegro_plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ public function init_form_fields()

public function process_payment($order_id){
$order = wc_get_order($order_id);
$shop_id = 'your shop_id'; //Замените на свой Shop_id
$shop_id = get_option('tegro_shop_id'); // Получаем из настроек WordPress
$amount = $order->get_total();
$currency = get_woocommerce_currency();
$order_id = $order->get_id();
$secret = 'your secret_key'; //замените на свой secret key
$secret = get_option('tegro_secret_key'); // Получаем из настроек WordPress

// Формируем данные для создания подписи
$data = array(
Expand All @@ -88,7 +88,6 @@ public function process_payment($order_id){
'result' => 'success',
'redirect' => $payment_url,
);
}


}
}