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
The data retrieved never includes the customer key, even if the customer reference is set (i.e. the customerReference key is present in the parameters).
The fix is pretty simple:
<?phppublicfunctiongetData()
{
$data = [
'success_url' => $this->getSuccessUrl(),
'cancel_url' => $this->getCancelUrl(),
'payment_method_types' => $this->getPaymentMethodTypes(),
'mode' => $this->getMode(),
'line_items' => $this->getLineItems(),
'customer' => $this->getCustomerReference() ?? null, // <---- this new line is needed
];
return$data;
}