WooCommerce - pay order with multiple payment methods at same time - php

I want to know if there is a way to customize WooCommerce such that the clients could pay the same order with multiple payment methods at the same time?
For example, if one order is worth $100, I want to allow clients to pay $25 with a Visa card, then $75 with a Discover card. So the general idea is to pay one order (don't checkout multiple times), but use more than just one payment method.
I assume there is some way to personalize something, but I want to know where/how to get started with it.
EDIT 1
Just adding a new payment gateway (custom) does not solve the issue. I know how to create a custom payment gateway.
The issue is: how do I allow on ONE checkout for ONE order to get the payment out of 2 or more sources at the same time? For example: $175 cashed in as $50 PayPal + $100 Visa + $25 MasterCard.
There are many clients who would love to have this option, and pay with more cards at the same time!
So, this is not one of those obvious questions as how do I create a custom payment gateway? - that is something easily achievable without spending too much time on it. The multiple payment on same checkout, however, proves to be lengthy / not discussed (I've researched many articles, forums, etc.)

What I would do is to create a custom payment gateway, and in that gateway, create interfaces for ALL the payment methods you want to use.
I would say use something like Stripe for all the CC and then PayPal - that way you will have only two separate ones to handle.
You need to put in an option to pay X amount on each payment gateway on the Checkout screen.
Then in your plugin when someone partially pays, create a coupon for the amount of the partial payment using the Coupon API and apply that.
You will also need an Order Status of Partial Payment or something. You would also need to redirect back to the Checkout page if the order isn't completely paid, instead of the Order Success page.
It's pretty complicated to do this right.

Workaround: You can purchase a gift card on our site for any amount with one credit card. You can then use the gift card and then use another credit card for the balance.
Example: Total price $450
Gift card purchase (Card "A"): $400
Credit Card balance (Card "B"): $50

Related

Multiple products in single charge Stripe?

My use case is that I have multiple products some of which are one time payment and others are recurring payment products. I want to charge the user only once so that the user doesn't have to pay for each product separately. According to my study we can create multiple product subscriptions with one charge. https://stripe.com/docs/billing/subscriptions/multiple-products#creating
If I had one-time payment products only, I can only receive one payment of the payment amount for selected products (as sum of prices).
But as I have mentioned I have some products which are recurring payment. So my question is if I add one-time payment products in this subscription request will they be charged again ones the recurring period overs, and if yes how can I Implement the above case in PHP?
Note: I want to implement this in custom form. I don't want to be redirected to stripe page.
You can use Stripe Checkout and combine both one-time and recurring prices3.
You can follow this guide in order to integrate Stripe Checkout with PHP.
Here what it will looks like for combining both prices types, the first charge will be for both pricing, and the second charge will be just for the recurring price(s):

Apply discount coupon code on first recurring payment in paypal (paypal-subscriptions)

I am using paypal (PHP) for recurring payment. It is working fine , but now i wants my user to get discount if they subscribe to my plans.
It is something like this, Plan actual cost is $20, if user subscribe to this plan , he should pay only $15,as $5 is given discount (only first time, after that next billing should be of $20).
can anyone help me how to do it in paypal.
I understand, Paypal currently is not supporting coupons or any kind of discounts on their /v1/billing/subscriptions or /v1/billing/plans endpoint.
You can manage yourself by creating Plan B (copy of Plan A but with a discount on price) and displaying that plan on the checkout. Then deactivate and activate other plan.

How to upload cart that contains both single payment items and installment items

I wrote my own shopping cart [in PHP] a couple of years ago that uses PayPal's Classic API "Payments Standard" -- specifically the "upload" command to send the contents of the shopping cart to PayPal. Now I want to add the option to pay for an item with installments and I want that to integrate with the shopping cart process.
In other words, I want the customer to be able to put Item A into the cart and select a single payment option, and then also put Item B in the same cart but select an installments option for that item. Then, when they hit the "Check Out With PayPal" button, I want the Item A and Item B to be processed in the same transaction. My cart also has a feature that allows the customer to enter a coupon code.
I have spent hours running in circles though the PayPal API documentation and I can't find a solution that seems to cover everything that I need:
No monthly payment (I'm too small to absorb monthly payments, so it must be a fee-per-transaction service).
Ability to process single payment items AND installment items from the same cart.
Ability to accept a discount/coupon and apply it to the transaction at the PayPal side.
All collection of payer's shipping address, payment information, etc, done at the PayPal side.
Determine if sales tax is required at the PayPal side.
Provide an IPN type response.
I'd rather not install code on the server [that needs to be maintained or reinstalled if I switch hosts].
Can anyone point me to a solution that could cover all of this?
I was looking at the Adaptive Payments solution but it looks like it I would have to determine whether to charge sales tax (and perhaps have to collect the payer's shipping address info, which I want to avoid). I like everything else about Adaptive Payments. Does anyone know if it will be as "nice" about handling the payer's information, as "Payments Standard" does?

Proper way to create dynamic automatic billing method with paypal API?

I know this maybe a duplicate but due to the overwhelming amount of paypal APIs I am having a hard time finding a GOOD answer to my question.
I need to create variable monthly billing per user in PHP. The idea is that a user could sell a number of items with a total sum of sales at the end of the month p. So the billing would be something of the extent MY_PERCENTAGE_FEE * p. The user would then be sent an invoice, and a would be automatically billed via paypal for that amount.
Now, it would be SUPER great if this could be done by creating reoccurring billing and updating the amount at the end of the month. Is that possible? If not what would be the next best way to go?
If you're creating recurring profiles with Payments Pro you can adjust those without any limits. Unfortunately, with Express Checkout you're limited to raising the amount by only 20% every 180 days, so that doesn't normally work out very well. You have a few options of how to get around that.
1) Utilize billing agreements with Express Checkout and Reference Transactions. This would allow you to run an authorization (or an original sale of some sort) for a payer and then from that point on you can use that transaction ID from the original transaction along with a new amount in the DoReferenceTransaction API. Reference Transactions area available with Payments Pro by default, but if you want to use them with Express Checkout you'll need to get that specifically enabled on your account.
2) Use the Preapproval API, which is part of the Adaptive Payments platform. This is similar to reference transactions except that you can create preapproved rules by which you can bill your payers at any time without further approval. This would allow you to process payments for them at any time you need to and pull variable amounts accordingly.
3) Use the Pay API, which is also part of Adaptive Payments, with a split payment (parallel or chained) which would allow you to take your cut in real-time without the need to track balances and submit variable recurring payments. Each time one of your customers is paid for their product/service, you would immediately be paid your share.

Paypal, Add to Cart - Can I sell a product AND a subscription at the same time?

I have a question regarding Paypal.
I have a website that I sell both products and subscriptions. I have been unable to figure out how someone can purchase a product and a subscription at the same time through my cart.
Logically I would see this as simply two products (one with reoccurring billing), but I can't seem to find a solution.
If you are using Website Payments Standard, this would not be possible. You can not have a regular single transaction and a subscription during the same checkout. However, if you are using Express Checkout, PayPal Payments Pro or Payflow this is possible through using the API's. Depending on which service you use, the flow/code would be slightly different.

Categories