#Ali-payment

1 messages · Page 1 of 1 (latest)

jolly blade
#

Hi Ali, can you show me the code to make this payment?

solemn copper
#

$session = \Stripe\Checkout\Session::create([
'payment_method_types' => ['card'],
'payment_intent_data'=>[

                                // 'on_behalf_of' => $user->stripe_account_id,
                    'metadata'=>[

                        'Client email' => $client->email,
                        'PR email' => $user->email,
                        'Brief Title' => $brief->title,
                        'Brief type' => $type,
                        'Brief Price' => $amount_without_fee,
                        'VAT' => $vatN,
                    ],
                ],





                'line_items' => [[
                    'price_data' => [
                        'currency' => 'gbp',
                        'product_data' => [
                            'name' => $brief->title,
                        ],
                        'unit_amount' => $amount * 100,
                    ],
                    'quantity' =>1,

                ]],
                'mode' => 'payment',
                'customer' => Auth::user()->customer_id,
                'success_url' => url('/')."/order/success?session_id={CHECKOUT_SESSION_ID}&invite_id=".$value."&brief_id=".$invite->brief_id."&pr_id=".$invite->pr_id."&nbf=".$fee,
                'cancel_url' => url('/').'/client/invite/'.$invite->id.'/accept',
            ]);
jolly blade
#

OK, can you give me the sessionID as well?

solemn copper
#

i have request id

#

req_NNfYxwTMm6xycy

jolly blade
#

that's even better, one sec

#

the unit_amount is "615.6", it should be an integer.

solemn copper
#

but the amount is as i told you 6.16 so how i can

#

@jolly blade