Closed ferdinand-tjandra closed 2 years ago
Hi @ferdinand-tjandra For the Token ID, it is part of tokenization process which you can find more details here: https://docs.xendit.co/credit-cards/integrations/tokenization
same question, I couldn't find it also on the postman example. That link refers to xendit.js, may I know the endpoint to create token API? I want to generate token using curl if this part does not exist yet in this library
in case anyone needs it, got it working ` public function charge() { $params = [ 'card_data' => [ 'account_number' => (string) request('card_number'), 'exp_month' => (string) request('exp_month'), 'exp_year' => (string) request('exp_year'), 'cvn' => (string) request('cvn'), ], 'card_cvn' => request('cvn'), 'amount' => request('amount'), 'is_single_use' => true, 'should_authenticate' => true, 'currency' => request()->has('currency') ? request('currency') : 'IDR', ];
$response = Http::withHeaders([
'Authorization' => 'Basic ' . base64_encode(config('xendit.public_key'). ':'),
])->post(config('xendit.base_url') . '/credit_card_tokens', $params);
return $response->json();
} `
Hi all,
sorry if im missing to read the documentation. i still confuse how do we generate the token ID when we want to use credit cart option payment?
please help