Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Save Cash App as Payment Type (Webhook Error) #1530

Closed
shatterproof opened this issue May 5, 2023 · 2 comments
Closed

Cannot Save Cash App as Payment Type (Webhook Error) #1530

shatterproof opened this issue May 5, 2023 · 2 comments

Comments

@shatterproof
Copy link
Contributor

Cashier Stripe Version

14.12.0

Laravel Version

9.52.7

PHP Version

PHP 8

Database Driver & Version

MySQL 8

Description

Stripe Checkout recently added Cash App Pay as an option for recurring payments, however using this with Cashier causes a 500 error for the webhooks customer.updated and customer.subscription.updated with the ErrorException: Attempt to read property "last4" on array. This is coming from the optional($paymentMethod)->$type->last4 code in ManagesPaymentMethods.php.

This happens apparently due to Cash App not providing that last4 attribute, but it is strange because the Link payment method also doesn't have the attribute but works just fine with the same webhooks.

The intended behavior is it should set the pm_type on the User model to cashapp with no error after checkout. Simply fixing this issue with the webhook should allow full support of Cashier with Cash App Pay via Stripe Checkout.

Steps To Reproduce

Use a Stripe Checkout with Cash App Pay for a recurring subscription and the webhooks that follow will trigger the above error.

@driesvints
Copy link
Member

Hmm that's odd. I guess this payment method doesn't have that object key. I can't find an example of a full cashapp object. Do you have one?

@shatterproof
Copy link
Contributor Author

From charge.succeeded it looks like this:

"payment_method_details": {
  "cashapp": {
  },
  "type": "cashapp"
}

Let me know if you need anything else for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants