Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About jwaldron92

  • Rank
  1. My billing.php does not work, as the result is just a button that says processing. This is has to be the most frustrating coding I have ever done, its one thing finding a bug and reading about it, but there is no connection between the post method and final, there seems to be a loophole in my server. The possible scenarios could be: AuthorizeNet doesnt work, then which should I use? The PHP built in server on PHPStorm is not using HTTP and the connection is never established (it uses a port on localhost) In addition, why should I have to put in all the form data each time I do a test? How do I create static variables instead of.... <?php create_form_input('cc_exp_year', 'select', $billing_errors); ?> So here is my connections for the server PHPStorm using built in server define('BASE_URI', 'C:/xampp/htdocs/pay/coffeeShop/'); define('BASE_URL', 'localhost:8282/'); define('MYSQL', BASE_URI . 'mysql.inc.php'); Having a form of billing that loks like if (!isset($_SESSION['customer_id'])) { // Redirect the user. // $location = 'https://' . BASE_URL . 'checkout.php'; $location = '' . BASE_URL . 'checkout.php'; //$location='checkout.php'; header("Location: $location"); exit(); } // Require the database connection: require(MYSQL); // Validate the billing form... // For storing errors: $billing_errors = array(); // Check for a form submission: if ($_SERVER['REQUEST_METHOD'] === 'POST') { ... ... if (isset($order_id, $order_total)) { // Make the request to the payment gateway: //require('library/anet_php_sdk/AuthorizeNet.php'); require('library/sdk-php-master/autoload.php'); define('API_LOGIN_ID', '***' ); define('TRANSACTION_KEY', '***' ); $aim = new AuthorizeNetAIM(API_LOGIN_ID, TRANSACTION_KEY); // Are we testing? //$aim->setSandbox(true); // Set the amount (in dollars): $aim->amount = $order_total/100; ... ... if ($response->approved) { // Add the transaction info to the session: $_SESSION['response_code'] = $response->response_code; // Redirect to the next page: $location = '' . BASE_URL . 'final.php'; header("Location: $location"); exit(); } ... Ultimately, looking to know what makes the processing take so long, and debugging strategies, thanks.
  2. I was not able to get the BASE URI and BASE URL to work with XAMPP and PHPStorm. Could you give an example, because chaning all the web address in the css will be difficult.
  • Create New...