shakurov / laravel-coinbase Goto Github PK
View Code? Open in Web Editor NEWLaravel wrapper for the Coinbase Commerce API
License: MIT License
Laravel wrapper for the Coinbase Commerce API
License: MIT License
I am developing a website with wallet feature. User can add any amount to their wallet, which can be used to play games or buy stuffs on the website. The site accepts cryptocurrency as their main payment.
ISSUE:
I have used shakurov/laravel-coinbase to accept the cryptocurrency payment. I am creating charges using "no_price" as pricing type. And when user pays using cryptocurrency, the completed screen shows "Thank you for your donation". I cannot find how to update this text creating charges.
Please help!!
Somewhy my project doesn't see the Coinbase facade.
php artisan cache:clear
composer dump-autoload
didn't help
webhook calls should return no exception errors if verified
webhook calls are returning exceptions "Undefined index"
{"code":0,"message":"Undefined index: metadata","trace":"#0 \/home\/i
job handler will work
sometimes exception appears, sometimes it works
dispatch(new HandleCreatedCharge(CoinbaseWebhookCall::findOrFail($test)));
post method to charge:create
public function test()
{
$charge = Coinbase::createCharge([
'name' => 'jajaja',
'description' => 'jeje',
'local_price' => [
'amount' => 100,
'currency' => 'USD',
],
'pricing_type' => 'fixed_price',
]);
$test = $charge['data']['id'];
// error here ->>
dispatch(new HandleCreatedCharge(CoinbaseWebhookCall::findOrFail($test)));
}
$e: Illuminate\Database\Eloquent\ModelNotFoundException
$e->model "Shakurov\Coinbase\Models\CoinbaseWebhookCall"
$e->message "No query results for model [Shakurov\Coinbase\Models\CoinbaseWebhookCall] 289c9315-0ff8-4fef-be8f-7e13aae6090f"
Simple call to API
$checkout = Coinbase::createCheckout([
'name' => 'Name',
'description' => 'Description',
'local_price' => [
'amount' => 100,
'currency' => 'USD',
],
'pricing_type' => 'fixed_price',
]);
results in error:
[2021-07-13 15:35:43] local.ERROR: Client error: `POST https://api.commerce.coinbase.com/checkouts?name=Name&description=Description&local_price%5Bamount%5D=100&local_price%5Bcurrency%5D=USD&pricing_type=fixed_price` resulted in a `400 Bad Request` response:
{"error":{"type":"invalid_request","message":"Requested info must specify desired customer info fields"}}
even though 'request_info' is optional per https://commerce.coinbase.com/docs/api/#create-a-checkout
Generic install on generic laravel create controller with the following function
public function createCheckout(Request $request){
$checkout = Coinbase::createCheckout([
'name' => 'Name',
'description' => 'Description',
'local_price' => [
'amount' => 100,
'currency' => 'USD',
],
'pricing_type' => 'fixed_price',
]);
return $checkout;
}
Charge and Events api's work as expected.
Using curl works fine:
COINBASE_COMMERCE_API_KEY=aaaaa-bbbbb-ccccc-ddddd
curl -X POST https://api.commerce.coinbase.com/checkouts \
-H "Content-Type: application/json" \
-H "X-CC-Api-Key: $COINBASE_COMMERCE_API_KEY" \
-H "X-CC-Version: 2018-03-22" \
-d '{"name": "The Sovereign Individual", "description": "Mastering the Transition to the Information Age", "local_price": {"amount": "1.00", "currency": "USD"}, "pricing_type": "fixed_price", "requested_info": ["email"]}'
and once I create it with Curl, getCheckouts
works fine too.
Latest PHP 7.x (7.4) version security support has ended 7 months ago (28 Nov 2022). It was not safe to use this version back then, even more so today. Also this minimum version requirement blocks the way for using modern development techniques.
Hi,
How exactly could I make the controller that handles the Endpoint?
I have created the jobs for each type of event that is sent by the Coinbase.
What I want to achive is how to get the data what is sent by the webhook, access the data to check the event type to send it to the job.
Thanks for the help!
Hi,
It was updated long time ago and the pull requests are ignored.
So therefore I am asking if it is abandoned or not?
How do I execute queued jobs for this package because i can't find any documentation on an artisan command to handle that
Greetings @shakurov ,
I was passing by (this repository) and tought I'd like to collaborate by proposing a logo
if that's something that may interest you! let me know!
I'm a Graphic Designer and an Open Source enthusiastic
looking to improve my portfolio and collaborate to really cool projects like this one!
Best Regards,
-Luigi.
Our library needs to be keep up to date with industry. Here is some things we need to do:
^7.3|^8.0
composer dependency^9.3.3
composer dependency^6.0.0
composer dependency^7.0.1
composer dependencyLaravel 5
from tags in composer.json
as it's gonna be compatible with newer versionsEach dependency requires to follow it's upgrade guide to avoid breaking changes. All tests must pass.
PRs are welcome!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.