Essentially I have a card saved for a customer using the QuickBooks API, but it seems I cannot recall the card as I keep getting the following error:
{"errors":[{"code":"PMT-4000","type":"invalid_request","message":"request is invalid.","detail":"request","moreInfo":"wallet Id supports only numeric values with length of 24","infoLink":"https://developer.intuit.com/v2/docs?redirectID=PayErrors"}]}
The following is what I am currently doing:
$client = new PaymentClient([
'access_token' => $accessTokenValue,
'environment' => "sandbox" ]);
$customerID = 105;
$cardId = 102115993327004305951126;
$card = $client->getCard($customerID, $cardId, rand() . "abd");
if($card->failed()){
$errorMessage = $card->getBody();
print_r($errorMessage);
}else{
$responseCharge = $card->getBody();
return $responseCharge->id;
print_r($responseCharge);
}
It is difficult to tell what I am doing incorrectly - as the error is not very detailed. I appreciate the help.
Please refer to the following for the Payment API Functions Github - Quickbooks Payments SDK
CodePudding user response: