Then it must be something else.
As far as I know the order.create.php snippet gets called, but the folder and .txt file never get created.
Here is the snippet:
// Honeypot trap for robots
if(r::is('post') and get('subject') != '') go(url('shop'));
$cart = Cart::getCart();
$country = get("country");
$shipping = 3.50;
if($cart->getAmount() < 50) {
if($country == "Deutschland") {
$shipping = 3.50;
} else if($country != "Deutschland"){
$shipping = 5.50;
}
} else {
$shipping = 0;
};
$discount = getDiscount($cart);
// Set the timestamp so txn-id and txn-date use the same value
$timestamp = date('U');
// Create a YAML-structured list of products
$items = [];
foreach ($cart->getItems() as $i => $item) {
$items[] = (array)$item;
}
// Unique transaction ID
$txn_id = get('gateway').'-'.$timestamp.'-'.bin2hex(openssl_random_pseudo_bytes(2));
try {
// Create the pending order file
page('shop/orders')->children()->create($txn_id, 'order', [
'txn-id' => $txn_id,
'txn-date' => $timestamp,
'txn-currency' => page('shop')->currency_code(),
'status' => 'pending',
'stripe-charge-id' => 'stripe-charge-id',
'token' => 'token',
'products' => "\n".yaml::encode($items),
'subtotal' => number_format($cart->getAmount(),2,'.',''),
'discount' => number_format($discount['amount'],2,'.',''),
'shipping' => number_format($shipping,2,'.',''),
'tax' => number_format($cart->getTax(),2,'.',''),
'giftcertificate' => null !== get('giftCertificateAmount') ? number_format(get('giftCertificateAmount'),2,'.','') : '0.00',
'discountcode' => $discount['code'],
'payer-id' => 'payer-id',
'payment_method' => 'payment-method',
'email' => 'email',
'firstname' => 'firstname',
'lastname' => 'lastname',
'street' => 'street',
'city' => 'city',
'country' => $country
]);
} catch(Exception $e) {
// Order creation failed
echo $e->getMessage();
}
// Redirect to self with GET, passing along the order ID
go('shop/cart/process/'.get('gateway').'/'.$txn_id);