GithubHelp home page GithubHelp logo

tighten / nova-stripe Goto Github PK

View Code? Open in Web Editor NEW
104.0 14.0 20.0 2.21 MB

Easily show information about Stripe charges and balances in your Nova dashboard

License: MIT License

Vue 35.95% JavaScript 44.74% PHP 19.23% CSS 0.08%

nova-stripe's Introduction

Nova-Stripe Logo

Laravel Nova Stripe Dashboard

Latest Version on Packagist Total Downloads

This package makes it easy to see high-level information about your application's Stripe balance, charges, and customers in a Nova dashboard.

If you are interested in managing your users' Stripe subscriptions with Laravel Cashier, check out Nova Cashier Manager by themsaid.

Installation

You can install this package via Composer:

$ composer require tightenco/nova-stripe

Usage

Add your Stripe key and secret values to your .env file:

STRIPE_KEY=
STRIPE_SECRET=

Add a stripe element to your config/services.php configuration file:

'stripe' => [
    'key' => env('STRIPE_KEY'),
    'secret' => env('STRIPE_SECRET'),
],

Register the NovaStripe tool in app/Providers/NovaServiceProvider:

public function tools()
{
    return [
        new \Tighten\NovaStripe\NovaStripe,
    ];
}

Features

View Stripe charges dashboard

Dashboard index page

View Stripe charges details

Charge detail page

View Stripe charges dashboard

Customers index page

View Stripe charges details

Customer detail page

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

Support us

Tighten is a web development firm that works in Laravel, Vue, and React. You can learn more about us on our web site

License

The MIT License (MIT). Please see License File for more information.

nova-stripe's People

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

Watchers

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

nova-stripe's Issues

Add a per page dropdown

Current Behavior

All transactions are listed 10 per page by default on the dashboard.

Expected Behavior

Implement a dropdown that allows a "per page" selection

View Link Incorrect on Customers Table When Nova At Root Path

I'm not sure why, but when Nova is at the root path, the View Link appears as /customers/${customer.id} without the /nova-stripe/ portion. Anyone have an idea why?

<InertiaLink :href="${novaPath}/nova-stripe/customers/${customer.id}" :aria-label="__('View')" >

Upon further testing, it's when the nova path is set to '/' vs an empty string. Seems that InertiaLink interprets two consecutive forward slashes as skipping a directory. Not sure if it's worth putting a check on the Nova path for this case or not, but that appears to be the cause.

You end up with //nova-stripe/customers/${customer.id} (InertiaLink converts to /customers/${customer.id})
vs
/nova-stripe/customers/${customer.id}

Fresh install fails

Hi,

The component looks awesome, I did encounter some issues when I initially tried to use it.

If there's an easy fix for it, I'd love to hear it, otherwise, I'll have a look at a PR in the weekend.
Two of the attributes a null instead of an object, which causes indefinite load.

 Nova.request().get('/nova-vendor/nova-stripe/stripe/charges', { params: params }).then(function (response) {
                _this.charges = response.data.charges.data; // Fails here because response.data.charges is null
                _this.hasMore = response.data.charges.has_more;
                _this.initialLoading = false;
                _this.loading = false;
            });
_vm._l(_vm.balance.available, function(available) {  // Fails here because vm.balance is null

Screenshot 2019-11-04 at 22 30 13

Screenshot 2019-11-04 at 22 29 56

Screenshot 2019-11-04 at 22 30 04

Nova 3 support for Customer Information

Hello, I gave this package a try and loving it currently!

One detail that I noticed working with a license in Nova 3 is the customer views shown in the README are only available in version 2 or newer, which requires Nova 4. I noticed the issues they were introduced in #33 and #36 were actually before the Nova 4 changes were made but there isn't a tagged version until after the v2 release.

I was wondering if it would be possible to get another tagged v1 release up to before #45 if it would be possible? I don't know if there's much interest but stumbled across this Laracasts thread beforehand, so there's at least one other person out there who might have interest ๐Ÿ˜…

Thank you!

Custom nova path

We have configured a custom nova path /admin but ChargesTable.vue is hardcoded to /nova

<InertiaLink
    :href="`/nova/nova-stripe/charges/${charge.id}`"
    :aria-label="__('View')"
>
    <HeroiconsOutlineEye />
</InertiaLink>

Improve test coverage

Expected Behavior

Add PHPUnit tests and Dusk tests to improve coverage of existing features

Add ability to search charges

Expected Behavior

Implement search to allow users to search for transactions meeting specified criteria. At a minimum, we should support the attributed currently displayed on the dashboard table

Changing the resource name from stripe to something else

I am looking for a way to change the Resource aname from STRIPE in nova dashborad to something different. I do not want to change the chane it in the package files directly in vendor directory. So far I have found nothing to acheive so. Can you guide me to do it?

I am not sure if it is a issue but not finding any other place to ask this so posting here. If this is not the place let me know the place where I can ask and get answer.

PHP 7.4 Support

Considering there are probably lots of folks still running PHP 7.4, I think it's a reasonable ask to make the v2 tool compatible.

Problem 1
- tightenco/nova-stripe[v2.0.0, ..., v2.0.1] require php ^8.0|^8.1 -> your php version (7.4.24) does not satisfy that requirement.
- Root composer.json requires tightenco/nova-stripe ^2.0.0 -> satisfiable by tightenco/nova-stripe[v2.0.0, v2.0.1].

Originally posted by @dsingh09 in #44 (comment)

Nova 4.0 Support?

Hi will this package be updated to work with the new Nova 4.0? I have noticed it has a similar abstract class issue as other Nova 3.0 packages at the moment.

Some data isn't parsed in the details view

This package is fantastic, but I've noticed that Metadata and Fraud Details aren't parsed in the details view instead just displaying [object Object], and Dispute and Transfer Group probably aren't either.

If you retrieve the charge details you can see Metadata is provided from the api:

"metadata": {
    "order_uuid": "c0238381-ed8c-4585-8ec7-f21e7a6ac6f0"
    },

Likewise,

"fraud_details": {
    "stripe_report": "fraudulent"
    },

Although, because this doesn't provide much insight maybe it could be combined with the outcome field to give more info:

"outcome": {
    "network_status": "not_sent_to_network",
    "reason": "merchant_blacklist",
    "risk_level": "highest",
    "risk_score": 87,
    "seller_message": "Stripe blocked this payment.",
    "type": "blocked"
    },

Or even:

"failure_code": "card_declined",
"failure_message": "Your card was declined.",

Thanks!

Custom nova path

Hello,

i have the issue, that i cant get the plugin to work.
My environment contains a custom nova path "/admin" and i make the menu myself (so the tool doesnt register the menu, i must do that myself).

In this scenario, if i ever open the nova-stripe page routes, the router falls down to the catch all route.
With artisan route:list i find all nova-stripe registered routes, but they dont work.

Do i need other steps to get this working? Or how can i debug this?

Regards
Eike

Nova::mainMenu

(MenuSection::make(
    'Stripe',
    [
        MenuItem::make(__('Dashboard'), '/nova-stripe'),
        MenuItem::make(__('Customers'), '/nova-stripe/customers'),
    ],
    'credit-card'
)->collapsable())->canSee(function ($request) {
    return $request->user()->hasRole('super-admin');
}),
public function tools()
{
    return [
        new \Tighten\NovaStripe\NovaStripe,
    ];
}

Cannot install with laravel cashier

Hi,

I cant install the package as it requires stripe/stripe-php ^6.12 while laravel cashier only supports ^5.0.

Is there a specific reason for needing the newer stripe version?

Thanks
Daniel

Add ability to sort fields

Current Behavior

The dashboard lists transactions in a table without the ability to sort by attribute (e.g. charge id, amount, created, status)

Expected Behavior

Each attribute in the table should be sortable with an ascending or descending sort order.

Add filter by status

Current Behavior

Successful and failed transactions are listed together on the stripe dashboard without an option to filter them.

Expected Behavior

Display a filter on the dashboard that allows transactions to be filtered by "successful" or "failed" status.

Authorization Failed

After installing the package and configuring the stripe keys, I am getting an error:

Call to a member function authorize() on string

Any ideas what may be going on? I am using Nova version 2.12.0

Unable to cache routes

There are two routes with the same name "nova-stripe.customers" which causes error when trying to cache routes via artisan command route:cache:

Unable to prepare route [nova/nova-stripe/customers/{customerId}] for serialization. Another route has already been assigned name [nova-stripe.customers]

Add navigation for sub items

Expected Behavior

Ths navigation should display an item for any core resources (e.g. charges, customers, etc). Currently, "charges" would be the only available option.

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.