| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* ©2011,2012,2013,2014 BITPAY, INC. |
| 5 |
* |
| 6 |
* Permission is hereby granted to any person obtaining a copy of this software |
| 7 |
* and associated documentation for use and/or modification in association with |
| 8 |
* the bitpay.com service. |
| 9 |
* |
| 10 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 11 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 12 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 13 |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 14 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 15 |
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 16 |
* THE SOFTWARE. |
| 17 |
* |
| 18 |
* Bitcoin PHP payment library using the bitpay.com service. |
| 19 |
* Version 1.1 |
| 20 |
* |
| 21 |
*/ |
| 22 |
|
| 23 |
global $bpOptions; |
| 24 |
|
| 25 |
// Please look carefully through these options and adjust according to your installation. |
| 26 |
// Alternatively, most of these options can be dynamically set upon calling the functions in bp_lib. |
| 27 |
|
| 28 |
// REQUIRED Api key you created at bitpay.com |
| 29 |
// example: $bpOptions['apiKey'] = 'L21K5IIUG3IN2J3'; |
| 30 |
$bpOptions['apiKey'] = ''; |
| 31 |
|
| 32 |
// whether to verify POS data by hashing above api key. If set to false, you should |
| 33 |
// have some way of verifying that callback data comes from bitpay.com |
| 34 |
// note: this option can only be changed here. It cannot be set dynamically. |
| 35 |
$bpOptions['verifyPos'] = true; |
| 36 |
|
| 37 |
// email where invoice update notifications should be sent |
| 38 |
$bpOptions['notificationEmail'] = ''; |
| 39 |
|
| 40 |
// url where bit-pay server should send update notifications. See API doc for more details. |
| 41 |
// example: $bpNotificationUrl = 'http://www.example.com/callback.php'; |
| 42 |
$bpOptions['notificationURL'] = ''; |
| 43 |
|
| 44 |
// url where the customer should be directed to after paying for the order |
| 45 |
// example: $bpNotificationUrl = 'http://www.example.com/confirmation.php'; |
| 46 |
$bpOptions['redirectURL'] = ''; |
| 47 |
|
| 48 |
// This is the currency used for the price setting. A list of other pricing |
| 49 |
// currencies supported is found at bitpay.com |
| 50 |
$bpOptions['currency'] = 'BTC'; |
| 51 |
|
| 52 |
// Indicates whether anything is to be shipped with |
| 53 |
// the order (if false, the buyer will be informed that nothing is |
| 54 |
// to be shipped) |
| 55 |
$bpOptions['physical'] = true; |
| 56 |
|
| 57 |
// If set to false, then notificaitions are only |
| 58 |
// sent when an invoice is confirmed (according the the |
| 59 |
// transactionSpeed setting). If set to true, then a notification |
| 60 |
// will be sent on every status change |
| 61 |
$bpOptions['fullNotifications'] = true; |
| 62 |
|
| 63 |
// transaction speed: low/medium/high. See API docs for more details. |
| 64 |
$bpOptions['transactionSpeed'] = 'low'; |
| 65 |
|
| 66 |
// Logfile for use by the bpLog function. Note: ensure the web server process has write access |
| 67 |
// to this file and/or directory! |
| 68 |
$bpOptions['logFile'] = '/bplog.txt'; |
| 69 |
|
| 70 |
// Change to 'true' if you would like automatic logging of invoices and errors. |
| 71 |
// Otherwise you will have to call the bpLog function manually to log any information. |
| 72 |
$bpOptions['useLogging'] = false; |
| 73 |
|
| 74 |
?> |
| 75 |
|