Giter VIP home page Giter VIP logo

laravel-coinbase's People

Contributors

alexstewartja avatar antimech avatar azcpavel avatar jeybin avatar pierre-pizzetta avatar shakurov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

laravel-coinbase's Issues

Variable payment always shows donation when completed?

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!!

Webhook call returning code 0, Undefined index

Required Information

  • Operating system: Linux
  • PHP version: 7.3.x
  • Laravel version: 8.x
  • Laravel Coinbase Commerce wrapper version:

Expected behaviour

webhook calls should return no exception errors if verified

Actual behaviour

webhook calls are returning exceptions "Undefined index"

Steps to reproduce

Extra details

{"code":0,"message":"Undefined index: metadata","trace":"#0 \/home\/i

Illuminate\Database\Eloquent\ModelNotFoundException

Required Information

  • Operating system:
  • PHP version: 7.2
  • Laravel version: 6.0
  • Laravel Coinbase Commerce wrapper version: v0.7.6

Expected behaviour

job handler will work

Actual behaviour

sometimes exception appears, sometimes it works

dispatch(new HandleCreatedCharge(CoinbaseWebhookCall::findOrFail($test)));

Steps to reproduce

post method to charge:create

Extra details

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"

createCheckout fails with "type":"invalid_request","message":"Requested info must specify desired customer info fields"

Required Information

  • Operating system: Windows
  • PHP version: 7.4.2
  • Laravel version: 8.16.1
  • Laravel Coinbase Commerce wrapper version: 0.7.7

Expected behaviour

Actual behaviour

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

Steps to reproduce

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;
}

Extra details

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.

Drop PHP 7.x support

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.

Controller for webhook

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!

Abandoned?

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 to execute queued Jobs

How do I execute queued jobs for this package because i can't find any documentation on an artisan command to handle that

Logo Proporsal for Laravel-Coinbase

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.

Laravel 8.x compatibility

Our library needs to be keep up to date with industry. Here is some things we need to do:

  • Opt for PHP ^7.3|^8.0 composer dependency
  • Opt for PHPUnit ^9.3.3 composer dependency
  • Opt for Testbench ^6.0.0 composer dependency
  • Opt for Guzzle ^7.0.1 composer dependency
  • Remove Laravel 5 from tags in composer.json as it's gonna be compatible with newer versions

Each dependency requires to follow it's upgrade guide to avoid breaking changes. All tests must pass.

PRs are welcome!

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.