I first created a customer with the help of API, when a customer created successfully then it returned me customerId, with the help of customerId I created a credit card.
// for creating user
gateway->customer()->create([
'firstName' => $firstName,
'lastName' => $lastName,
'company' => $company,
'email' => $email,
'phone' => $phone,
'fax' => $fax,
'website' => $website
]);
//for creating card
$result = $this->gateway->creditCard()->create([
'customerId' => $customerId,
'number' => $number,
'expirationDate' => $expirationDate,
'cvv' => $cvv
After saving card in vault successfully it gives me a token In order to retrive data of card I did this:
$result = $this->gateway->creditCard()->find($token);
and it returned me the card detail, Now I want to perform payment with this card detail or token(as I am confused). previously I successfully done payment with drop in UI but I want to use vault this time