WordPress plugin added under plugins dir

This commit is contained in:
Matt Pass 2018-07-19 19:50:12 +01:00 committed by GitHub
parent 682684b01d
commit b86e42eb18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,52 @@
<?php
/**
* @package BTCP_Pay
* @version 1.0
*/
/*
Plugin Name: BTCP Pay
Plugin URI: http://wordpress.org/plugins/btcp-pay/
Description: Official BTCP Pay plugin from the Bitcoin Private core dev team. Allows users to add their widget button directly into the Wordpress website so they can take Bitcoin Private payments.
Author: Bitcoin Private
Version: 1.0
Author URI: https://btcprivate.org
*/
function btcp_pay_widget() {
echo '
<!-- BTCP Pay Widget // -->
<!-- Set parameters and actions //-->
<script id="btcp_widget_data">
var btcpWidget = {};
btcpWidget.data = {
"id" : "btcp_widget",
"buttonData" : "buy_A1_6",
"merchantid" : "414",
"walletid" : "2",
"amount" : 0.001,
"itemid" : "0",
"description" : "Pepperoni Pizza",
"transactiondetails" :
{
"size" : "12 inch",
"crust" : "stuffed",
"pan" : "thin base"
}
};
btcpWidget.onPaymentSuccess = function(data) {
alert("Payment success! Data:\n\n" + JSON.stringify(data));
};
btcpWidget.onPaymentFail = function(data) {
alert("Payment failed! Reason: " + data.reason);
}
</script>
<!-- Load core functionality //-->
<script src="//mattpass.com/lab/widget.js" id="btcp_widget"></script>
';
}
?>