ontarget
Active Member
Hi by default the Stripe plugin is set to USD.
Changing "Currency Code" to EUR or eur has no effect on the stripe popup but it does change the currency in the Price Tab> Cost field
How can we use Euro please?
I have starte looking at the stripe.php file and tried hard coding "EUR" into the value for $currencyCode but no joy so far.
In another non-Fabrik stripe system i wrote the following lines of code to ensure Euro was selected
Changing "Currency Code" to EUR or eur has no effect on the stripe popup but it does change the currency in the Price Tab> Cost field
How can we use Euro please?
I have starte looking at the stripe.php file and tried hard coding "EUR" into the value for $currencyCode but no joy so far.
In another non-Fabrik stripe system i wrote the following lines of code to ensure Euro was selected
Code:
<?php
require_once('./config.php');
include 'header.php';
$token = $_POST['stripeToken'];
$amount = $_POST['amount'];
$email = $_POST['stripeEmail'];
$customer = \Stripe\Customer::create(array(
'email' => $email,
'source' => $token
));
$charge = \Stripe\Charge::create(array(
'customer' => $customer->id,
'amount' => $amount*100,
'currency' => 'eur'
));
$thankyou = '<h1>Thank you for your payment</h1>';
echo "<div id='thankyou' class='center'>" . $thankyou, $customer['email'] . "<br/> ",$charge['currency'], $amount . "</div>";
include 'footer.php';
?>