Plugin Directory

Changeset 1859249


Ignore:
Timestamp:
04/16/2018 05:45:53 PM (8 years ago)
Author:
spicepay1
Message:

Currency select option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spicepay/trunk/spicepay.php

    r1796742 r1859249  
    3737    $this->public_key = $this->get_option('public_key');
    3838    $this->secret_key = $this->get_option('secret_key');
     39    $this->select_currency = $this->get_option('select_currency');
    3940    $this->title = 'Cryptocurrency payments';
    4041    $this->description = 'Pay with Bitcoin or Litecoin or Bitcoin Cash or other cryptocurrencies via SpicePay';
     
    8788            'description' => __('Copy SECRET KEY from spicepay.com/tools.php', 'woocommerce'),
    8889            'default' => ''
     90        ),
     91        'select_currency' => array(
     92            'title' => __('Currency', 'woocommerce'),
     93            'type' => 'select',
     94            'description' => __('Select currency', 'woocommerce'),
     95            'default' => '',
     96            'options' => array(
     97                'USD' => 'USD',
     98                'EUR' => 'EUR',
     99                'GBP' => 'GBP'
     100            )
    89101        )
    90 
     102       
    91103    );
    92104}
     
    100112    $sum = number_format($order->get_total(), 2, '.', '');
    101113    $account = $order_id;
    102    
    103    
     114
    104115    $code = '<form id="spicepaypaymentmethod" name="spicepaypaymentmethod" action="https://www.spicepay.com/p.php" method="POST">'
    105116    . '<input type="hidden" name="amount" value="' . $sum . '" />'
    106     . '<input type="hidden" name="currency" value="USD" />'
     117    . '<input type="hidden" name="currency" value="' . $this->select_currency . '" />'
    107118    . '<input type="hidden" name="orderId" value="' . $order_id . '"/>'
    108119    . '<input type="hidden" name="siteId" value="' . $this->public_key . '"/>'
Note: See TracChangeset for help on using the changeset viewer.