diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/BitPayLib/BPC_Buttons.php b/BitPayLib/BPC_Buttons.php new file mode 100644 index 0000000..359acc3 --- /dev/null +++ b/BitPayLib/BPC_Buttons.php @@ -0,0 +1,24 @@ + diff --git a/BitPayLib/BPC_Client.php b/BitPayLib/BPC_Client.php new file mode 100644 index 0000000..4e5325f --- /dev/null +++ b/BitPayLib/BPC_Client.php @@ -0,0 +1,11 @@ + diff --git a/BitPayLib/BPC_Configuration.php b/BitPayLib/BPC_Configuration.php new file mode 100644 index 0000000..6ea3a0f --- /dev/null +++ b/BitPayLib/BPC_Configuration.php @@ -0,0 +1,56 @@ +apiToken = $apiToken; + if($network == 'test' || $network == null): + $this->network = $this->BPC_getApiHostDev(); + else: + $this->network = $this->BPC_getApiHostProd(); + endif; +} + +function BPC_generateHash($data) { + return hash_hmac('sha256', $data, sha1($this->BPC_getAPIToken())); +} + +function BPC_checkHash($data,$hash_key) { + if(hash_equals($hash_key,hash_hmac('sha256', $data, sha1($this->BPC_getAPIToken())))){ + return true; + }; + return false; +} + +function BPC_getAPIToken() { + return $this->apiToken; +} + +function BPC_getNetwork() { + return $this->network; +} + +public function BPC_getApiHostDev() +{ + return 'test.bitpay.com'; +} + +public function BPC_getApiHostProd() +{ + return 'bitpay.com'; +} + +public function BPC_getApiPort() +{ + return 443; +} + +public function BPC_getInvoiceURL(){ + return $this->network.'/invoices'; +} + + +} +?> diff --git a/BitPayLib/BPC_Invoice.php b/BitPayLib/BPC_Invoice.php new file mode 100644 index 0000000..b07231f --- /dev/null +++ b/BitPayLib/BPC_Invoice.php @@ -0,0 +1,106 @@ +item = $item; + + } + + public function BPC_checkInvoiceStatus($orderID) + { + + $post_fields = ($this->item->item_params); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, 'https://' . $this->item->invoice_endpoint . '/' . $post_fields->invoiceID); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $result = curl_exec($ch); + curl_close($ch); + return $result; + } + + public function BPC_createInvoice() + { + + + $post_fields = json_encode($this->item->item_params); + + $pluginInfo = $this->item->item_params->extension_version; + $request_headers = array(); + $request_headers[] = 'X-BitPay-Plugin-Info: ' . $pluginInfo; + $request_headers[] = 'Content-Type: application/json'; + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, 'https://' . $this->item->invoice_endpoint); + curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $result = curl_exec($ch); + + $this->invoiceData = $result; + + curl_close($ch); + + } + + public function BPC_getInvoiceData() + { + return $this->invoiceData; + } + + public function BPC_getInvoiceURL() + { + $data = json_decode($this->invoiceData); + return $data->data->url; + } + + public function BPC_updateBuyersEmail($invoice_result, $buyers_email) + { + $invoice_result = json_decode($invoice_result); + + $update_fields = new stdClass(); + $update_fields->token = $this->item->item_params->token; + $update_fields->buyerProvidedEmail = $buyers_email; + $update_fields->invoiceId = $invoice_result->data->id; + $update_fields = json_encode($update_fields); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, 'https://' . $this->item->buyers_email_endpoint); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $update_fields); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $result = curl_exec($ch); + curl_close($ch); + return $result; + + } + + public function BPC_updateBuyerCurrency($invoice_result, $buyer_currency) + { + $invoice_result = json_decode($invoice_result); + + $update_fields = new stdClass(); + $update_fields->token = $this->item->item_params->token; + $update_fields->buyerSelectedTransactionCurrency = $buyer_currency; + $update_fields->invoiceId = $invoice_result->data->id; + $update_fields = json_encode($update_fields); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, 'https://' . $this->item->buyer_transaction_endpoint); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $update_fields); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $result = curl_exec($ch); + curl_close($ch); + return $result; + + } + +} diff --git a/BitPayLib/BPC_Item.php b/BitPayLib/BPC_Item.php new file mode 100644 index 0000000..e2be1a2 --- /dev/null +++ b/BitPayLib/BPC_Item.php @@ -0,0 +1,21 @@ +token = $config->BPC_getAPIToken(); + $this->endpoint = $config->BPC_getNetwork(); + $this->item_params = $item_params; + return $this->BPC_getItem(); +} + + +function BPC_getItem(){ + $this->invoice_endpoint = $this->endpoint.'/invoices'; + $this->buyer_transaction_endpoint = $this->endpoint.'/invoiceData/setBuyerSelectedTransactionCurrency'; + $this->item_params->token = $this->token; + return ($this->item_params); +} + +} + +?> diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2cec3ac --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2019 BitPay, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 8b13789..550b0e6 100644 --- a/README.md +++ b/README.md @@ -1 +1,43 @@ +# Notice +This is a Community-supported project. + +If you are interested in becoming a maintainer of this project, please contact us at integrations@bitpay.com. Developers at BitPay will attempt to work along the new maintainers to ensure the project remains viable for the foreseeable future. + +# Description + +Embed a shortcode on any page or post to instantly accept Bitcoin payments. + +# Quick Setup + +This version requires the following + +* A BitPay merchant account ([Test](http://test.bitpay.com) or [Production](http://www.bitpay.com)) +* An API Token ([Test](https://test.bitpay.com/dashboard/merchant/api-tokens) or [Production](https://bitpay.com/dashboard/merchant/api-tokens) + * When setting up your token, **uncheck** the *Require Authentication button* + + +# Plugin Fields + +After the plugin is activated, BitPay QuickPay will appear in the left navigation of Wordpress + + +* **Merchant Tokens** + * A ***development*** or ***production*** token will need to be set +* **Endpoint** + * Choose **Test** or **Production**, depending on your current setup. Your matching API Token must be set. + +* **Currency** + * Choose the currency to accept. If no currency is set, **USD** will be the default. + +# How to use + +In the settings page, there is a list of buttons to display. Simply adjust the price for any button, and your code will automatically be generated. + +Example: `[bitpayquickpay name ="paywithbitpaysupportedcurrencies" price="1.50"]` + +Copy and paste this code into a post/page/widget to generate a button. + + + +![](https://bitpay.com/cdn/en_US/bp-btn-pay-currencies.svg) \ No newline at end of file diff --git a/assets/banner-1544x500.png b/assets/banner-1544x500.png new file mode 100644 index 0000000..972433a Binary files /dev/null and b/assets/banner-1544x500.png differ diff --git a/assets/banner-772x250.png b/assets/banner-772x250.png new file mode 100644 index 0000000..1669436 Binary files /dev/null and b/assets/banner-772x250.png differ diff --git a/assets/icon-256x256.png b/assets/icon-256x256.png new file mode 100644 index 0000000..0f78df9 Binary files /dev/null and b/assets/icon-256x256.png differ diff --git a/assets/screenshot-1.png b/assets/screenshot-1.png new file mode 100644 index 0000000..255b7e3 Binary files /dev/null and b/assets/screenshot-1.png differ diff --git a/assets/screenshot-2.png b/assets/screenshot-2.png new file mode 100644 index 0000000..777238f Binary files /dev/null and b/assets/screenshot-2.png differ diff --git a/assets/screenshot-3.png b/assets/screenshot-3.png new file mode 100644 index 0000000..e6c7c1f Binary files /dev/null and b/assets/screenshot-3.png differ diff --git a/assets/screenshot-4.png b/assets/screenshot-4.png new file mode 100644 index 0000000..c47db9f Binary files /dev/null and b/assets/screenshot-4.png differ diff --git a/assets/screenshot-5.png b/assets/screenshot-5.png new file mode 100644 index 0000000..ca36d0d Binary files /dev/null and b/assets/screenshot-5.png differ diff --git a/assets/screenshot-6.png b/assets/screenshot-6.png new file mode 100644 index 0000000..eafa7f3 Binary files /dev/null and b/assets/screenshot-6.png differ diff --git a/assets/screenshot-7.png b/assets/screenshot-7.png new file mode 100644 index 0000000..0f21817 Binary files /dev/null and b/assets/screenshot-7.png differ diff --git a/assets/screenshot-8.png b/assets/screenshot-8.png new file mode 100644 index 0000000..7dbc011 Binary files /dev/null and b/assets/screenshot-8.png differ diff --git a/css/bitpayquickpay.css b/css/bitpayquickpay.css new file mode 100644 index 0000000..9ad803b --- /dev/null +++ b/css/bitpayquickpay.css @@ -0,0 +1,15 @@ + +.bpqpButton{ + background-color: transparent; +} +.bpqpButton:hover {opacity:.5; background-color: transparent;} +.bpqpButton:active { + background-color: transparent; +} + +.bpqpMsg{ + background-color: transparent; + display:none; +} + +.bpqpButtonClicked {opacity:.5; background-color: transparent;} diff --git a/index.php b/index.php new file mode 100644 index 0000000..c030b18 --- /dev/null +++ b/index.php @@ -0,0 +1,418 @@ +Configure + * Version: 1.0.0.0 + * Author: BitPay + * Author URI: mailto:integrations@bitpay.com?subject=BitPay QuickPay + */ + +add_action('admin_menu', 'bitpayquickpay_setup_menu'); +add_action('wp_enqueue_scripts', 'enable_bitpayquickpay_js'); +add_action('admin_enqueue_scripts', 'admin_enable_bitpayquickpay_js'); + +#autoloader +function BPQP_autoloader($class) +{ + if (strpos($class, 'BPC_') !== false): + if (!class_exists('BitPayLib/' . $class, false)): + #doesnt exist so include it + include 'BitPayLib/' . $class . '.php'; + endif; + endif; +} +spl_autoload_register('BPQP_autoloader'); + +#custom css +add_action('init', 'bitpay_quickpay_css'); +function bitpay_quickpay_css() { + wp_register_style( 'bpqp', plugins_url('/css/bitpayquickpay.css', __FILE__), false, '1.0.0', 'all'); +} +add_action('wp_enqueue_scripts', 'bpqp_enqueue_style'); +function bpqp_enqueue_style(){ + wp_enqueue_style( 'bpqp' ); + } + + + + +add_action('admin_notices', 'bitpayquickpay_check_token'); +function bitpayquickpay_check_token() +{ + $bitpay_token = get_option('bitpayquickpay_option_dev_token'); + $env = 'test'; + if (get_option('bitpayquickpay_option_endpoint') == 'production'): + $env = 'production'; + $bitpay_token = get_option('bitpayquickpay_option_prod_token'); + endif; + $config = new BPC_Configuration($bitpay_token, $env); + if (empty($bitpay_token)): ?> + + +
+

+ ' . strtoupper($env) . ' is invalid. Please verify your settings.');?> +

+
+ +
+

+ +

+
+ +extension_version = BPC_getBitPayVersionInfo(); + $params->price = '10.00'; + $params->currency = 'USD'; //set as needed + + $item = new BPC_Item($config, $params); + $invoice = new BPC_Invoice($item); + + //this creates the invoice with all of the config params from the item + $invoice->BPC_createInvoice(); + $invoiceData = json_decode($invoice->BPC_getInvoiceData()); + //now we have to append the invoice transaction id for the callback verification + $invoiceID = $invoiceData->data->id; + if (empty($invoiceID)): + return false; + else: + return true; + endif; +} + +function enable_bitpayquickpay_js() +{ + wp_enqueue_script( 'remote-bitpayquickpay-js', 'https://bitpay.com/bitpay.min.js',null,null,true); + wp_enqueue_script('bitpayquickpay-js', plugins_url('/js/bitpayquickpay_js.js', __FILE__)); + ?> + + + BPC_getButtons()); + if (!$name_only) { #get the images + + $brand = ''; + foreach ($buttons->data as $key => $b): + + $names = preg_split('/(?=[A-Z])/', $b->name); + $names = implode(" ", $names); + $names = ucwords($names); + if (strpos($names, "Donate") === 0): + continue; + endif; + $shortcode_name = strtolower($b->name); + + + $brand .= '
' . $names . '

' . $b->description . '

'; + $brand .= ''; + $brand .= ' Allow users to change amount
+ '; + $brand .= ''; + $brand .=''; + $brand .='
'; + $brand .='
'; + + $brand .= '
'; + endforeach; + + return $brand; + } else { + foreach ($buttons->data as $key => $b): + $shortcode_name = strtolower($b->name); + if ($shortcode_name == $name_only && $price != false): + $env = 'test'; + if (get_option('bitpayquickpay_option_endpoint') == 'production'): + $env = 'production'; + endif; + $post_url = get_home_url() . '/wp-json/bitpayquickpay/pay'; + $btn_id = 'btnPay_'.uniqid(); + $btn = '
'; + + $type = 'hidden'; + if($bto == true){ + $type = 'text'; + } + $btn .=''; + $btn.='
'.get_option('bitpayquickpay_option_message').'
'; + $btn .= ''; + $btn.= ""; + $btn.='
'; + return $btn; + + endif; + endforeach; + + } + +} +add_action('rest_api_init', function () { + register_rest_route('bitpayquickpay', '/pay', array( + 'methods' => 'POST,GET', + 'callback' => 'bitpayquickpay_pay', + )); + +}); +function bitpayquickpay_pay(WP_REST_Request $request) +{ + $data = $request->get_params(); + $price = $data['price']; + $description = $data['description']; + + #create the invoice + $env = 'test'; + $bitpay_token = get_option('bitpayquickpay_option_dev_token'); + + if (get_option('bitpayquickpay_option_endpoint') == 'production'): + $env = 'production'; + $bitpay_token = get_option('bitpayquickpay_option_prod_token'); + + endif; + $config = new BPC_Configuration($bitpay_token, $env); + //sample values to create an item, should be passed as an object' + $params = new stdClass(); + $params->extension_version = getBitpayQuickpayInfo(); + $params->price = $price; + $params->currency = get_option('bitpayquickpay_option_currency'); + + if (empty(get_option('bitpayquickpay_option_currency'))): + $params->currency = 'USD'; + endif; + if($description != ''){ + $params->itemDesc =$description; + } + + $item = new BPC_Item($config, $params); + $invoice = new BPC_Invoice($item); + //this creates the invoice with all of the config params from the item + $invoice->BPC_createInvoice(); + $invoiceData = json_decode($invoice->BPC_getInvoiceData()); + + return $invoiceData; + +} + +function BitPayQPGetCurrencies() +{ + $currencies = ["USD", "EUR", "GBP", "JPY", "CAD", "AUD", "CNY", "CHF", "SEK", "NZD", "KRW"]; + return $currencies; +} + +function getBitpayQuickpayInfo() +{ + $plugin_data = get_file_data(__FILE__, array('Version' => 'Version', 'Plugin_Name' => 'Plugin Name'), false); + $plugin_name = $plugin_data['Plugin_Name']; + $plugin_name = str_replace(" ", "_", $plugin_name); + $plugin_version = $plugin_name . '_' . $plugin_data['Version']; + return $plugin_version; +} + +function bpqp_load_options() +{ + #this page creates the admin settings + echo '

Customize your BitPay QuickPay shortcodes.

'; + echo '

Setup your environment, and preview the buttons that will be added with the shortcode

'; + ?> +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
  + Your development merchant token. Create one + here and uncheck `Require Authentication`. +
  + Your production merchant token. Create one + here and uncheck `Require Authentication`. +
+ +
  + Select Test for testing the plugin, Production when you are ready to go live. +
+ +
  + Select Test for testing the plugin, Production when you are ready to go live. +
+
  + This message will appear after a successful payment (optional) +
+ +
+
+'; + echo '
'; + echo '

BitPay QuickPay Shortcode Options

'; + echo '

Use the shortcode tag to embed anywhere.

'; + + echo '
'; + echo '
'; + echo '
'; + echo '1) Adjust the price for any button below to have your code automatically generated.

'; + echo $images; + echo '
'; + + #vertical div + echo '
'; + echo '2) Copy and paste the code below to a Post or Page

'; + echo '
'; + echo 'your generated code will appear here'; + echo '
'; + echo '
'; + echo '
'; +} +?> diff --git a/js/admin_bitpayquickpay_js.js b/js/admin_bitpayquickpay_js.js new file mode 100644 index 0000000..d6c3bb5 --- /dev/null +++ b/js/admin_bitpayquickpay_js.js @@ -0,0 +1,64 @@ +function generateBPQPCode(button){ + + //clear out other text boxes + jQuery('.bp_input').each(function (i, obj) { + if (obj.id != 'gen_' + button && obj.id != 'desc_' + button) { + obj.value = '' + } + }); + val = jQuery('#gen_'+button).val(); + val = val.trim(); + if (val.length == 0 || !jQuery.isNumeric(val)){ + val = val.substring(0, val.length - 1) + jQuery('#gen_' + button).val(val) + if (!jQuery.isNumeric(val)){ + jQuery("#generated_code").html(' your generated code will appear here'); + } + return + } + + if(isNaN(parseInt(val)) || parseInt(val) == 0){ + alert('Minimum of 1.00 is required') + return + } + + var str; + + str = '[bitpayquickpay name ="'+button+'"'; + str += ' price = "'+val+'"'; + + //is there a description? + var d = jQuery('#desc_'+button).val(); + d = d.trim(); + + if(d.length>0){ + str+=' description = "'+d+'"'; + } + var chk = jQuery('#chk_'+button).is(':checked'); + if(chk){ + str+=' allow_override = "true"'; + } + + str+=']' + jQuery("#generated_code").text(str); + +} + +function BPQP_Clean(val,button){ + if (val.length == 0 || !jQuery.isNumeric(val)){ + val = val.substring(0, val.length - 1) + jQuery('#gen_' + button).val(val) + if (!jQuery.isNumeric(val)){ + jQuery("#generated_code").html(' your generated code will appear here'); + } + return + } + + //clear out other text boxes + jQuery('.bp_input').each(function (i, obj) { + if (obj.id != 'gen_' + button) { + obj.value = '' + } + }); + +} diff --git a/js/bitpayquickpay_js.js b/js/bitpayquickpay_js.js new file mode 100644 index 0000000..0be8cf5 --- /dev/null +++ b/js/bitpayquickpay_js.js @@ -0,0 +1,83 @@ +function showBpQp(env, api, btnId) { + BPQPAddClickState() + BPQPhideMessage() + var price = jQuery('#' + btnId).val() + if (price.length == 0) { + alert('Please enter a price') + return + } + + if (isNaN(parseInt(price)) || parseInt(price) == 0) { + alert('Minimum of 1.00 is required') + jQuery('#' + btnId).val('') + return + } + + + var d = jQuery('#desc_' + btnId).val() + if (env == 'test') { + bitpay.enableTestMode() + } + if(d.length > 0){ + d = d +' - ' + price + }else{ + d = price + } + var myObj = { + price: price, + description: d + } + var saveData = jQuery.ajax({ + type: 'POST', + url: api, + data: myObj, + dataType: "text", + + success: function (resultsData) { + + response = JSON.parse(resultsData); + if (typeof (response.error) !== "undefined") { + BPQPRemoveClickState() + BPQPhideMessage() + alert(response.error) + return; + } + bitpay.showInvoice(response.data.id) + + } + + }); + bitpay.onModalWillLeave(function() { + BPQPRemoveClickState() + }); + +} + + +function BPQPFrontend_Clean(val, button) { + if (val.length == 0 || !jQuery.isNumeric(val)) { + val = val.substring(0, val.length - 1) + jQuery('#' + button).val(val) + + return + } +} + +function BPQPAddClickState() { + jQuery('.bpqpButton').addClass("bpqpButtonClicked"); + jQuery('.bpqpButton').prop('disabled', true); +} + +function BPQPRemoveClickState() { + jQuery('.bpqpButton').removeClass("bpqpButtonClicked"); + jQuery('.bpqpButton').prop('disabled', false); + +} + +function BPQPshowMessage() { + jQuery('.bpqpMsg').show() +} + +function BPQPhideMessage() { + jQuery('.bpqpMsg').hide() +} diff --git a/options.php b/options.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/options.php @@ -0,0 +1 @@ + Add New > Search plugins and type **BitPay** +3. Select **BitPay QuickPay** and click on **Install Now** and then on **Activate Plugin** + +After the plugin is activated, BitPay QuickPay will appear in left navigation. + += Plugin configuration = + +After you have installed the BitPay QuickPay plugin, the configuration steps are: + +1. Create an API token from your BitPay merchant dashboard: + * Login to your BitPay merchant account and go to the [API token settings](https://bitpay.com/dashboard/merchant/api-tokens) + * Click on the **Add new token** button: indicate a token label (for instance: Woocommerce), uncheck "Require Authentication" and click on the **Add Token** button + * Copy the token value +2. Log in to your WordPress admin panel, select BitPay QuickPay to show the configuration section + * Paste the token value into the appropriate field: **Development Token** for token copied from the sandbox environment (test.bitpay.com) and **Production Token** for token copied from the live environment (bitpay.com) + * Select the endpoint - Test or Production + * Select the currency + * Add a custom (optional) Thank You message to show after a payment is made + * Click "Save changes" at the bottom of the page + +== Frequently Asked Questions == + += How do I pay a BitPay invoice? = +You can pay a BitPay invoice with one of the compatible wallets. You can either scan the QR code, click on the "open in wallet" button or copy/paste the payment URL via a compatible wallet. + +More information about paying a BitPay invoice can be found [here.](https://support.bitpay.com/hc/en-us/articles/115005559826-How-do-I-pay-a-BitPay-merchant-without-a-bitcoin-address-) + += Does BitPay have a test environment? = +Yes, you can create an account on BitPay's sandbox environment to process payments on testnet. You will also need to setup a wallet on testnet to make test transactions. More information about the test environment can be found [here.](https://bitpay.com/docs/testing) + += The BitPay plugin does not work = +If BitPay invoices are not created, please check the following: + +* The minimum invoice amount is $1 USD. Please make sure you are trying to create a BitPay invoice for $1 USD or more (or your currency equivalent). +* Check your current approved processing limits in your [BitPay merchant account](https://bitpay.com/dashboard/verification) + += I need support from BitPay = +When contacting BitPay support, please describe your issue and attach screenshots and any server logs. + +You can contact our support team via the following form https://bitpay.com/request-help/wizard + +== Screenshots == + +1. BitPay merchant dashboard - create a new POS token +2. BitPay QuickPay settings +3. Creating a custom shortcode +4. Embedding the shortcode in a page +5. Frontend view of the html generated by the shortcode +6. BitPay hosted invoice - cryptocurrency selected +7. BitPay hosted invoice - Customer clicked on the "open in wallet", this opens the compatible wallet installed on the device which automatically retrieves the payment information. +8. The customer confirmed the payment via his compatible wallet. The BitPay invoice is then marked as paid, and the status will be sent via email.