Comments (12)
@msquareM Please check if your API key has Money-In Write
permission in https://dashboard.xendit.co/settings/developers#api-keys
from xendit-php.
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.
@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.
@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.
@msquareM You should be passing in the charge id (not auth id) as the first param for capturing credit card charges
from xendit-php.
@msquareM auth id and the token will only be needed at creating charge step
from xendit-php.
@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.
@msquareM You're using default currency IDR so amount must be an integer
from xendit-php.
@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.
@msquareM the amount for credit charges should be at least 5000
from xendit-php.
@stanleynguyen thankyou so much now its working
from xendit-php.
@msquareM the pleasure's all mine
from xendit-php.
Related Issues (20)
- xenPlatform - create invoice with "with-fee-rule" header value HOT 2
- Xendit.card.createToken authentication failed with reason AUTHENTICATION_FAILED HOT 1
- Callback Virtual Akun HOT 1
- Callback E-Wallets HOT 1
- Uncaught Error: Interface 'Xendit\Exceptions\ExceptionInterface' not found in HOT 1
- Experiencing multiple cURL request timeout HOT 4
- "Could not find and update PENDING invoice" error HOT 1
- Is any update to support the new Payouts to replace old Disbursement method HOT 1
- Payment menggunakan ovo tervalidasi sesaat setelah charge HOT 2
- xendit HOT 1
- Wrong validation parameters in createCustomer() method HOT 1
- CALLBACK_VIRTUAL_ACCOUNT_NOT_FOUND_ERROR HOT 1
- Creating Payment Request Using 3.0.0 SDK HOT 7
- Invalid Value for Enum '\Xendit\Invoice\BankCode' HOT 4
- Package not compatibele with documentation on xendit docs api reference HOT 3
- Provide an API Endpoint to get all user subscription HOT 3
- Installation Error: Unable to Extract Xendit PHP Package HOT 5
- Failed webhook send, but not redirected to failure redirect url HOT 1
- ERROR getAllTransactions using WITHDRAWAL status
- Error Class "Xendit\Xendit\Invoice\CreateInvoiceRequest" not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xendit-php.