feat: ✨ added correct currency code for stripe api
This commit is contained in:
parent
a77455c5fd
commit
27794078cc
1 changed files with 4 additions and 10 deletions
|
@ -62,6 +62,7 @@ class PaymentController extends Controller
|
||||||
*/
|
*/
|
||||||
public function PaypalPay(Request $request, CreditProduct $creditProduct)
|
public function PaypalPay(Request $request, CreditProduct $creditProduct)
|
||||||
{
|
{
|
||||||
|
echo $creditProduct->currency_code;
|
||||||
$request = new OrdersCreateRequest();
|
$request = new OrdersCreateRequest();
|
||||||
$request->prefer('return=representation');
|
$request->prefer('return=representation');
|
||||||
$request->body = [
|
$request->body = [
|
||||||
|
@ -240,7 +241,7 @@ class PaymentController extends Controller
|
||||||
'line_items' => [
|
'line_items' => [
|
||||||
[
|
[
|
||||||
'price_data' => [
|
'price_data' => [
|
||||||
'currency' => 'eur',
|
'currency' => $creditProduct->currency_code,
|
||||||
'product_data' => [
|
'product_data' => [
|
||||||
'name' => $creditProduct->display,
|
'name' => $creditProduct->display,
|
||||||
'description' => $creditProduct->description,
|
'description' => $creditProduct->description,
|
||||||
|
@ -251,7 +252,7 @@ class PaymentController extends Controller
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'price_data' => [
|
'price_data' => [
|
||||||
'currency' => 'eur',
|
'currency' => $creditProduct->currency_code,
|
||||||
'product_data' => [
|
'product_data' => [
|
||||||
'name' => 'Product Tax',
|
'name' => 'Product Tax',
|
||||||
'description' => $creditProduct->getTaxPercent() . "%",
|
'description' => $creditProduct->getTaxPercent() . "%",
|
||||||
|
@ -261,14 +262,7 @@ class PaymentController extends Controller
|
||||||
'quantity' => 1,
|
'quantity' => 1,
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'payment_method_types' => [
|
|
||||||
'card',
|
|
||||||
'giropay',
|
|
||||||
'ideal',
|
|
||||||
'klarna',
|
|
||||||
'sofort',
|
|
||||||
'sepa_debit',
|
|
||||||
],
|
|
||||||
'mode' => 'payment',
|
'mode' => 'payment',
|
||||||
'success_url' => route('payment.PaypalCancel'),
|
'success_url' => route('payment.PaypalCancel'),
|
||||||
'cancel_url' => route('payment.PaypalCancel'),
|
'cancel_url' => route('payment.PaypalCancel'),
|
||||||
|
|
Loading…
Add table
Reference in a new issue