When Mollie retrieves the user's data, it rounds up the id.
<?php
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Cache;
use Overtrue\LaravelFollow\Followable;
use Overtrue\LaravelLike\Traits\Liker;
use Laravel\Cashier\Billable;
use Laravel\Cashier\Order\Contracts\ProvidesInvoiceInformation;
class User extends Authenticatable
{
use Notifiable, Followable, Liker, Billable;
protected $primaryKey = 'steam_id';
protected $dates = ['community_banned_until'];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'avatar', 'steam_url', 'steam_id',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
public function getInvoiceInformation()
{
return [$this->name, $this->email];
}
public function getIdAttribute()
{
return $this->steam_id;
}
}
/**
* @param string $plan
* @return \Illuminate\Http\RedirectResponse
*/
public function __invoke(string $plan)
{
$name = 'premium';
if(!Auth::user()->subscribed($name, $plan)) {
$result = Auth::user()->newSubscription($name, $plan)->create();
if(is_a($result, RedirectToCheckoutResponse::class)) {
return $result; // Redirect to Mollie checkout
}
//create subscription
return back()->with('status', 'Welcome to the ' . $plan . ' plan');
}
return back()->with('status', 'You are already on the ' . $plan . ' plan');
}
When i do a dd(Auth::user()->getIdAttribute()); i got 76561198024018092 but in mollie dashboard i got
When Mollie retrieves the user's data, it rounds up the id.
When i do a
dd(Auth::user()->getIdAttribute());
i got 76561198024018092 but in mollie dashboard i gotMollie round up 092 to 100 in three last digit id