Code Monkey home page Code Monkey logo

Comments (12)

stanleynguyen avatar stanleynguyen commented on August 25, 2024

@msquareM Please check if your API key has Money-In Write permission in https://dashboard.xendit.co/settings/developers#api-keys

from xendit-php.

msquareM avatar msquareM commented on August 25, 2024

Hi @stanleynguyen thankyou so much its working now but i have one more doubt
how to get saved card details using token in laravel ? please give any example and my code look like below
Xendit::setApiKey('hidden_development_key');
$params = ['amount' => 1013.5];
$captureCharge = \Xendit\Cards::capture($request->authid,$params);

and throw below error
"message": "Could not find credit card charge",
"exception": "Xendit\Exceptions\ApiException","

from xendit-php.

stanleynguyen avatar stanleynguyen commented on August 25, 2024

@msquareM may I know why you need to get card details and which details you are looking to retrieve? We use tokens so that the card details don't flow through your backend system, ensuring the payment process to be PCI-DSS compliant.

from xendit-php.

msquareM avatar msquareM commented on August 25, 2024

@stanleynguyen this is saved credit card concept that why i am using Multiple-Use Token in xendit client side and i have two ids one is authid and another one is token

when i give token or auth id in server side look like below

Xendit::setApiKey('hidden_development_key');
$params = ['amount' => 1013.5];
$captureCharge = \Xendit\Cards::capture($request->authid,$params);

throw below error
message": "Could not find credit card charge",
"exception": "Xendit\Exceptions\ApiException","

from xendit-php.

stanleynguyen avatar stanleynguyen commented on August 25, 2024

@msquareM You should be passing in the charge id (not auth id) as the first param for capturing credit card charges

from xendit-php.

stanleynguyen avatar stanleynguyen commented on August 25, 2024

@msquareM auth id and the token will only be needed at creating charge step

from xendit-php.

msquareM avatar msquareM commented on August 25, 2024

@stanleynguyen ok now i first creating charge step
look like below code
Xendit::setApiKey('hidden_development_key');
$params = [
'token_id' => $request->xendittoken,
'external_id' => 'card_' . time(),
'authentication_id' => $request->authid,
'amount' => 1013.5,
'card_cvn' => '123',
'capture' => false
];
$createCharge = \Xendit\Cards::create($params);
but throw below error
"message: "There was an error with the format submitted to the server.",…}
exception: "Xendit\Exceptions\ApiException""

from xendit-php.

stanleynguyen avatar stanleynguyen commented on August 25, 2024

@msquareM You're using default currency IDR so amount must be an integer

from xendit-php.

msquareM avatar msquareM commented on August 25, 2024

@stanleynguyen ok i changed amount to integer but still get same error
my code :
$params = [
'token_id' => $request->xendittoken,
'external_id' => 'card_'.time(),
'authentication_id' => $request->authid,
'amount' => 1013,
'card_cvn' => '123',
'capture' => false
];
$createCharge = \Xendit\Cards::create($params);

from xendit-php.

stanleynguyen avatar stanleynguyen commented on August 25, 2024

@msquareM the amount for credit charges should be at least 5000

from xendit-php.

msquareM avatar msquareM commented on August 25, 2024

@stanleynguyen thankyou so much now its working

from xendit-php.

stanleynguyen avatar stanleynguyen commented on August 25, 2024

@msquareM the pleasure's all mine

from xendit-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.