Open davidwebca opened 3 years ago
My bad, it doesn't get filtered out, but actually triggers another error instead: cardExpiry may not be null which, apparently from the docs, isn't supposed to happen.
Found the actual problem.
setOptionalFields will not let it pass if singleUseToken is specified because there's a check on optional fields (instead of actually being optional as the name suggests). setOptionalFields needs to be set on fields that are expected. If singleUseToken is specified, it won't work. I'm making a fork and pull request to be able to pull the dependency with composer since I need this right now.
Function updateCard in CustomerVault filters out singleUseToken as it doesn't allow it even as a facultative param.
https://github.com/paysafegroup/paysafe_sdk_php/blob/master/source/Paysafe/CustomerVaultService.php#L408
This prevents updating cards with a single use token through the customer vault.