Skip to content

Commit a781d98

Browse files
committed
Add Procfile and default to system env settings when dot-env file missing
1 parent 07778da commit a781d98

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: php -S 0.0.0.0:$PORT -t public_html

includes/braintree_init.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
session_start();
33
require_once("../vendor/autoload.php");
44

5-
$dotenv = new Dotenv\Dotenv(__DIR__ . "/../");
6-
$dotenv->load();
5+
if(file_exists(__DIR__ . "/../.env")) {
6+
$dotenv = new Dotenv\Dotenv(__DIR__ . "/../");
7+
$dotenv->load();
8+
}
79

810
Braintree\Configuration::environment(getenv('BT_ENVIRONMENT'));
911
Braintree\Configuration::merchantId(getenv('BT_MERCHANT_ID'));

0 commit comments

Comments
 (0)