A fatal error "call to a member function authorizations() on null" is thrown when trying to capture authorized payment from guest user.
Steps to reproduce
Set intent to Authorize
Enable Vaulting
Create manual order for guest user
Pay for this order
Capture this order
Observe error
Possible cause
It is currently possible to create a PurchaseUnit instance with a null Payments value. The consumer code is calling payment authorizations on a null payments instance and therefore the error "call to a member function authorizations() on null" is thrown.
Proposed solution
Ensure purchase units payments instance is not null before using it.
A fatal error "call to a member function authorizations() on null" is thrown when trying to capture authorized payment from guest user.
Steps to reproduce
Possible cause
It is currently possible to create a PurchaseUnit instance with a null Payments value. The consumer code is calling payment authorizations on a null payments instance and therefore the error "call to a member function authorizations() on null" is thrown.
Proposed solution
Ensure purchase units payments instance is not null before using it.