How can I add a new payment method along with the Card in the livewire Laravel. I want to add bacs_debit payment method. see the below screenshot.
Related
I installed Cashier following the official Laravel documentation.
Then, I created a price list with my products on Stripe that I integrated into my project.
When I click on a product in the price list, I am redirected to the Stripe checkout and then proceed to payment. In the Stripe dashboard, I can see that a new customer has been created and that the subscription has been started. Stripe then sends the following webhooks to my project:
Nevertheless, Cashier does not seem to update the database.
The stripe_id field is not updated and no subscriptions are added to the subscriptions table.
I am wondering how to implement payments in Flutter(or any other framework, like react or angular).
There is an existing website built in Wordpress and WooCommerce. The following plugin is used:
WooCommerce
Mollie payments for woocommerce (https://nl.wordpress.org/plugins/mollie-payments-for-woocommerce/)
How can I handle a payment, that matches the order id and moves the user to the payment banking screen?
When a user presses the "Checkout" button in the frontend, do I need to do the following?
Call a custom function that was made in Wordpress PHP (wp-json/payment/create)
Call the woocommerce endpoint create order in that PHP function. https://woocommerce.github.io/woocommerce-rest-api-docs/#create-an-order.
And then call the mollie endpoint create payment in that PHP function? https://docs.mollie.com/reference/v2/payments-api/create-payment. Put order id in parameters that I received from the woocommerce endpoint.
Then return the redirect link to the react or flutter app
How can I know that the payment is succesful? Then I can call 'update order' and set the status from 'waiting for payment' to 'processing order'. (So Wordpress admin can see that the customer paid.
I could not find a tutorial on this topic and therefore I decided to make this question public. I only saw wordpress tutorials... So I hope this question can help a lot of people.
How far are you with this? Because I don't know if using the regular mollie plugin is going to help out.
Mollie has documentation on how to also implement their api on JS framework.
The question you need to answer first is:
Are you able to create an order using the WooCommerce API. So can you order a product, without actually using a payment gateway (the add to cart to checkout flow)?
Have you tried using the Mollie nodejs version?
A tip:
Any payment gateway(stripe, mollie etc) add the order_id as meta_data on a order. So after going through the payment flow the order has to be created, with the right payment_id + the status (failed, pending blabla).
Edit:
Another option could be to create custom endpoints which loads something like this: https://github.com/mollie/mollie-api-php
So maybe something like:
create the order using the woocommerce api
after creating the order, return to the js app and then trigger another endpoint
this endpoint would load the custom Mollie api
I hope this makes sense?
How do I delete a customer in Stripe using Laravel's Cashier built-in method?
I know there's a way to delete a customer through Stripe's API - https://stripe.com/docs/api/customers/delete But I want to use Laravel's Cashier method because it is much cleaner in my code instead of creating another code to use Guzzle in working on Stripe API.
Any help or tips is greatly appreciated! Thanks!
There doesn't appear to be a delete method for Customers with Laravel Cashier. You'll need to make that API call to Stripe directly.
Stripe has so many different methods it's kinda confusing which one to used. I have a credit card form for the user after he/she has selected the subscription they want to purchase. From this point, I want to create the customer, setup payment and subscription all in one step.
Do I do:
Create customer
Create payment method
Create subscription
OR
Create Intent
Create Session
Or does creating a session handle create customer, create payment method and create subscription all in one?
If you want to use the hosted Checkout solution, you would not collect payment details yourself. Stripe does that for you as part of the Checkout flow. You can create a customer ahead of time, but by default Checkout will create one for you.
Most likely using Checkout with mode=subscription to start a subscription is going to be your most straightforward option. If you do use Checkout this way, you would not create any Subscriptions/Intents directly yourself. You can also use the Customer Portal to manage changes to the subscriptions later.
You can also go with the custom flow you described, creating the customer, attaching payment methods and starting a subscription, but this is more involved.
I have following requirement. App user A calls another user B and if the user B attends the call, $1 has to be debited from his credit card. Card details will be collected during the registration step.
There is no subscription involved in the process. Do I need to use Laravel cashier for this?
Answer: You don't need to use Laravel cashier for "one-off" charges.
In their document they were clearly mentioned following.
If you're only performing "one-off" charges and do not offer subscriptions, you should not use Cashier. Instead, use the Stripe and Braintree SDKs directly.