GithubHelp home page GithubHelp logo

Comments (5)

enkota avatar enkota commented on May 4, 2024 1

Hey @driesvints ahh sorry, missed that part in the docs. Didn’t realise we could override that on the Model. All makes sense now :) Thanks!

from cashier-paddle.

enkota avatar enkota commented on May 4, 2024

I can see under ManagesCustomer you are referencing the email column on the particular model. It would be good to override so we can set the customer_email in the create method.

    public function paddleEmail()
    {
        return $this->email;
    }

from cashier-paddle.

driesvints avatar driesvints commented on May 4, 2024

Hey @enkota. Please read the core concepts in the docs, particularly the section here: https://laravel.com/docs/7.x/cashier-paddle#user-identification

We take over control of the customer_email key in Cashier to ensure every payment made is properly linked to the same use in Paddle. This is absolutely vital to make sure Cashier Paddle works properly.

Unfortunately this is due to how Paddle's user identification works and there's no other way for us to achieve this.

from cashier-paddle.

enkota avatar enkota commented on May 4, 2024

Hey @driesvints. I understand that you need to control the customer_email key, however, at the moment when using a different Billable model than User, the payLink will not assign to any email and require the user to enter one on the pop-up.

I do not need to update the email after creation, only the inital subscription where the Tenant owner is the relation to the user.

If you’d rather not allow the email to be passed on the create() method, would you allow the email to be passed through newSubscription()?

For my case, adding the relation to paddleEmail works perfectly since the Tenant belongs to the owner (User):

    public function paddleEmail()
    {
        return $this->owner->email;
    }

This would be useful as at the moment no email can be assigned on a Billable model outside User.

Thanks!

from cashier-paddle.

driesvints avatar driesvints commented on May 4, 2024

If you’d rather not allow the email to be passed on the create() method, would you allow the email to be passed through newSubscription()?

Hmm we don't allow that anywhere?

I think you're looking for https://laravel.com/docs/7.x/cashier-paddle#customer-defaults. You can overwrite the paddleEmail method just like you did. It was intended to be used like this. I'm not sure if I understand you completely correctly?

from cashier-paddle.

Related Issues (20)

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.