Skip to content

Commit

Permalink
Added cross compatibility for versions 5 and 6
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Leitner authored and Sam Bohler committed Jul 13, 2015
1 parent 7e945f7 commit 0d00f26
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion modules/gateways/bit-pay/createinvoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,19 @@
* THE SOFTWARE.
*/

include '../../../dbconnect.php';
include '../../../includes/functions.php';
include '../../../includes/gatewayfunctions.php';
include '../../../includes/invoicefunctions.php';

if (file_exists('../../../dbconnect.php')) {
include '../../../dbconnect.php';
} else if (file_exists('../../../init.php')) {
include '../../../init.php';
} else {
bpLog('[ERROR] In modules/gateways/bitpay/createinvoice.php: include error: Cannot find dbconnect.php or init.php');
die('[ERROR] In modules/gateways/bitpay/createinvoice.php: include error: Cannot find dbconnect.php or init.php');
}

require 'bp_lib.php';

$gatewaymodule = 'bitpay';
Expand Down
10 changes: 9 additions & 1 deletion modules/gateways/callback/bitpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@
*/

// Required File Includes
include '../../../dbconnect.php';
include '../../../includes/functions.php';
include '../../../includes/gatewayfunctions.php';
include '../../../includes/invoicefunctions.php';

if (file_exists('../../../dbconnect.php')) {
include '../../../dbconnect.php';
} else if (file_exists('../../../init.php')) {
include '../../../init.php';
} else {
bpLog('[ERROR] In modules/gateways/bitpay/createinvoice.php: include error: Cannot find dbconnect.php or init.php');
die('[ERROR] In modules/gateways/bitpay/createinvoice.php: include error: Cannot find dbconnect.php or init.php');
}

require_once '../bit-pay/bp_lib.php';

$gatewaymodule = 'bitpay';
Expand Down

0 comments on commit 0d00f26

Please sign in to comment.