You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
@osiset
I want to apply usage charges from the Job file. I have referred to this documentation, but I can't find a way to run this URL from the job file.
# App/Http/Controllers/Example
# ...
public function index()
{
// Description and price of usage charge (the only two parameters required)
$charge = [
'description' => 'Five e-mails',
'price' => 1.00,
'redirect' => route('example.success') // Optional, if not supplied redirect goes back to previous page with flash `success`=`true`
];
// Create a signature to prevent tampering
$signature = createHmac(['data' => $charge, 'buildQuery' => true], Config::get('shopify-app.api_secret'));
// Create the route
$usageChargeRoute = route('billing.usage_charge', array_merge($charge, ['signature' => $signature]));
return view('example.index', compact('usageChargeRoute'));
<a href="{{ $usageChargeRoute }}">Add more emails!</a>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
@osiset
I want to apply usage charges from the Job file. I have referred to this documentation, but I can't find a way to run this URL from the job file.
<a href="{{ $usageChargeRoute }}">Add more emails!</a>
Beta Was this translation helpful? Give feedback.
All reactions