Comments (5)
Can you post a snippet of your code?
Also try importing
use Luigel\Paymongo\Facades\Paymongo;
instead of
use Luigel\Paymongo\Paymongo;
from laravel-paymongo.
Im already importing
use Luigel\Paymongo\Facades\Paymongo
and tried
use Luigel\Paymongo\Paymongo;
Here's the code
public function handle()
{
$payment = Paymongo::payment()->create([
'amount' => 55900,
'currency' => 'PHP',
'description' => 'Testing payment',
'statement_descriptor' => 'Test Paymongo',
'source' => [
'id' => 'src_AvX628NWYoG1WmrJespGgLTt',
'type' => 'source.chargeable'
]
]);
logger($payment);
return response()
->json([
'successfulPayment' => $payment
], 200);
}
from laravel-paymongo.
@sironronron I'm using laravel-paymongo v1.1.1. What version are you using?
Everything is working on my side. And you need to edit the amount. It should be a double type not integer. And also in the source
parameter. The type
should be source
.
This is my snippet of a sample payment using source.
$payment = Paymongo::payment()->create([
'amount' => 100.00,
'currency' => 'PHP',
'description' => 'Testing payment',
'statement_descriptor' => 'Test Paymongo',
'source' => [
'id' => 'src_61pBVCExTt5LxFj9N7kBs8L5',
'type' => 'source'
]
]);
from laravel-paymongo.
I'm also using laravel-paymongo v1.1.1. Should I re-install it?
Thanks. Changed it.
from laravel-paymongo.
Re-installed it and now using laravel-paymongo v1.1.2.
Thanks.
from laravel-paymongo.
Related Issues (20)
- Add Error Handling Support for Custom Message or Attribute [IDEA] HOT 2
- [BUG] syntax error, unexpected ')' in Traits/HasCommandValidation.php:14 HOT 1
- Paymongo Error when passing a tenth or hundredth decimal in amount argument HOT 2
- Generates an error when using phpstan
- [BUG] 500 internal error
- Paymaya supported? HOT 13
- [Documentation Issue] Amount Conversion to integer HOT 4
- [BUG] Executing Cancel Payment Intent produces a BadRequest error exception HOT 1
- [IDEA] Paymaya Feature HOT 2
- [IDEA] HOT 1
- Gcash Supported? HOT 1
- Gcash Payment help HOT 3
- Laravel Testing Mocking
- [BUG] Getting list of webhooks returns the array but the data is empty HOT 2
- [BUG]PHP 8 Support HOT 2
- [Feature] Add links api HOT 1
- tests are failing HOT 1
- [BUG] Implement 3D Secure using this library? HOT 1
- [IDEA] Checkout API HOT 2
- [BUG]
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 laravel-paymongo.