#femina-agravat_code

1 messages ยท Page 1 of 1 (latest)

void geyserBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1240224432006496316

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

royal stirrupBOT
lost breach
bronze shadow
#

Let me check

lost breach
#

I have tried to sendInvoice but in test mode we are not receiving an email
In test mode you need to use your stripe account email as a customer email in order to get an email

bronze shadow
#

Can you send me code of SendInvoice

#

my hosted_invoice_url: null

#

it is because of status: "draft" ? Do I have to hit "Finalize an invoice" API ?

lost breach
#

You need to finalize it

bronze shadow
lost breach
bronze shadow
#

Or connected account email ?

lost breach
#

The account creating the invoice

bronze shadow
#

I am creating an invoice under connected account

#

$invoice = \Stripe\Invoice::create(['customer' => $cust_id, 'auto_advance' => false, 'collection_method' => 'send_invoice', 'due_date' => strtotime($dueDate), ], ['stripe_account' => $acc_id]);

void geyserBOT
fickle axle
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

#

the email of the platform should work

bronze shadow
#

Ok

#

Also I am facing the error in finalizeinvoice

fickle axle
#

what's the error?

bronze shadow
#

try {
$invoice = \Stripe\Invoice::finalizeInvoice($invoiceId,['stripe_account' => $acc_id]);
return $invoice;
}
catch(\Throwable $th) {
dump($th);
return $th->getMessage();

    }
#

ERROR is : "Using $this when not in object context"

fickle axle
#

this request req_v5mZk8qm5bFLyW is a get request

#

ERROR is : "Using $this when not in object context"
this is a PHP error not a Stripe error

bronze shadow
#

I am using PHP librabry or package with symfony

and this the code of lib file

public function finalizeInvoice($params = null, $opts = null)
{
$url = $this->instanceUrl() . '/finalize';
list($response, $opts) = $this->_request('post', $url, $params, $opts);
$this->refreshFrom($response, $opts);

    return $this;
}
fickle axle
#

you should use stripe-php SDK instead of posting yourself

bronze shadow
#

Ok I got the solution thank you and fixed the error

bronze shadow
#

One last question

#

When we retrieve a paid invoice then how we can get the data that how much stripe fee was charged ?

fickle axle
bronze shadow
#

Ok Thank you

void geyserBOT