Comments (5)
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.
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.
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.
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.
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)
- Fix incrementQuantity() & decrementQuantity() Throwing Error HOT 5
- Notice in the docs about "default checkout URL" HOT 1
- [2.x] add end at of the subscription period HOT 1
- Fix nextPayment() total HOT 1
- returnTo function added to checkout does not redirect HOT 6
- Bill for non-catalog items HOT 6
- Issues with subscriptions "price_id must be a string" HOT 4
- Webhook duplicating the response statuses HOT 8
- Cashier::findBillable($customerId) not returning anythying HOT 2
- Get subscription payment method HOT 1
- Add support for authentication via client-side tokens HOT 1
- Paddle webhook handler doesnt work HOT 10
- Laravel cashier-paddle package conflict with passport Auth Header HOT 1
- Paddle with Passport giving: Authentication header included, but incorrectly formatted HOT 3
- Pausing Subscriptions HOT 1
- Applying a discount on checkout HOT 1
- Problem with billing API - Transaction not created in the db HOT 13
- Changing email on the payment screen HOT 5
- Activate subscription is not working. HOT 10
- Integrity constraint violation: 1048 Column 'billable_id' cannot be null HOT 3
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 cashier-paddle.