#deepakkumar_wizniche

1 messages · Page 1 of 1 (latest)

fallow mirageBOT
orchid bay
#

Hi

calm token
orchid bay
#

No because my code doesn't request it

#

it catches error before

#

(\Stripe\Exception\UnknownApiErrorException $e

#

It catches UnknownAPIerror before creating the request

#

Am I typing the paymentLinks wrong?

calm token
#

You're trying to create a Payment Link, is that correct?

#

What language are you using? I'm unable to identify it from the above snipped as I mainly work on Node.js.

orchid bay
#

Yes

#

I am using Php

#

PHP

calm token
#

In that case you're code should look something like this:

$stripe->paymentLinks->create([
'line_items' => [
[
'price' => 'price_1LqKJMGHtciddFoAd1bxFjK6',
'quantity' => 1,
],
],
]);

orchid bay
#

$charge = \Stripe\Charge::create([
// 'amount' => $data['amount'],
// 'currency' => 'usd',
// 'source' => $data['card_token'],
// 'description' => $data['description'],
// 'transfer_group' => $data['wallet_token'],
// 'application_fee_amount'=>'0',//If Wizniche wants to charge fee per transaction.
// ], ['stripe_account' => $data['wallet_token']]);

#

But this is how my charge works

calm token
orchid bay
#

Yeah I know it is correct

#

But i was talking about syntax of the charge

calm token
#

I see, could you try it with the above example code from the document?
On your code, you're combining the Charges API $charge with the Payment Links API it looks like.

orchid bay
#

I did that intentionally

#

i was testing

calm token
#

Got it, so you're able to create a Payment Link as expected?