Common php IDE file structure usage
- A simple stripe API payment example.
- Upon visiting the page, (1) create a customer, (2) create a paymentintent with the customer.
- The content of the code field will be included in index.php
- Two PHP files will reside in the page dir
- app.ini will reside out of doc root dir
- index_inc.php will include shared.php
- shared.php uses app.ini, which is in the other record
- shared.php will use stripe library
doc_base /home/cmsnow/www/hosts/design.asonehosting.com/docs/
/home/cmsnow/www/hosts/design.asonehosting.com/docs/..//default/en-US/nav6h3/E/Dev/s/Stripe/Payment/php/app.ini
array(7) {
["DOMAIN"]=>
string(21) "http://localhost:4242"
["PAYMENT_METHOD_TYPES"]=>
string(4) "card"
["PRICE"]=>
string(15) "price_abc123..."
["STATIC_DIR"]=>
string(9) "../client"
["STRIPE_PUBLISHABLE_KEY"]=>
string(32) "pk_test_5cQYArKzzFMqm4LZbptu9EPe"
["STRIPE_SECRET_KEY"]=>
string(107) "rk_test_515ztjhK6p085J4TOzcIs9anO7ynwFXEPG8z6QqwMiC6UJk3hgcEsk2VVlIgZLcDXU6IP2hDZumFsElgpzU8J1ic400YYMdXUZd"
["STRIPE_WEBHOOK_SECRET"]=>
string(70) "whsec_619acc2ccce06fb6cb07be1b6ac72a907257dddb19fa90be64b7cc84e3218216"
}
Error
Failed to create a PaymentIntent
Please check the server logs for more information