Paypal Buy now button without shipping anything? - php

I have a buy now (pay now) button but when a user pays, I'll get a notification that the user pays but i can't get the money unless i shipped the item to the User.
I don't have items to be shipped! I want the button to be something like the donation button, if someone pays i get the money immediately.
But I don't want DONATIONS, I am actually using the pay now and NOT the buy now button so there's nothing to buy, but you pay for something like a VIP service
I don't want to use the subscription button because I want the user to pay as many times as he wants, the more times he pays the more service he gets.
So how can i get the money from the pay now without having to deliver any items?
Update
#BillyMoon I am actually giving something but not a physical item you know - i don't know how to explain it, like when you buy chips from facebook zinga poker game, the user can pay many times and get more chips.
or like when you pay on facebook to advertise something there, you can pay many times if you want to have many ads, I can give you guys many examples!!
Haven't you played any games, or paid to any service, where you get something, but not a physical item?
#Robert
I host a competition on my site, if you pay 3$, you'll get a chance to enter the competition, if you pay twice you'll get more chance of winning, you can subscribe to my site without paying but you won't be entering the competition and you won't have a chance to win (i don't want to give more details until I launch the site) but you see the main idea
I was testing the buy now button so i made the value of it 0.10$ (which is the minimum value possible) just for testing coz i am from lebanon, not allowed to use and don't know how to use sandbox
so i paid twice, just to see if everything is working so i should receive 0.20$ right?
i go to my paypal, I can see that i paid twice but the money wasn't added to my paypal let me show you, I had 0.86$ before i paid to this account. but this amount didn't increase
Although I received the payments, my paypal balance is still the same

Turn off shipping address collection by setting no_shipping to '1'.
This will remove the 'Print shipping label' option, and not include the shipping address for you.
A billing address will still be required on the credit card entry screen (obviously).
Set <input type="hidden" name="no_shipping" value="1">

Related

How to integrate paypal

My website is for people who own bikes, offer them for rent, then clients come and book their bikes for drive.
So here is my problem with paypal.
Client picks bike from list and book it
Client confirms that everything is ok with prices and make payment on Paypal Checkout to my website Paypal business account
Problem starts here:
This amount of $ is not yet taken from client (for 48 hours), owner of bike should confirm it first through his account on my web.
When owner of boat confirms it, then payment executes and take money from clients card or paypal account
After that I pay owner his $ through my business account and that's not a problem. Those 3rd and 4th steps above are.
Is that even possible? If yes, how do i do it?
Thanks!
Yes. It is possible with PayPal.
We are calling it Authorization and Capture. It is a two-step payment model. In this model, Authorization is Step 1, It is happening when the customer is completing his payment.
Capture is Step 2. It is happening when the seller has confirmed the order and he can capture the amount.
For example a client needs to book a bike a bike for 100$. When placing an order, Client will authorize(Normal paypal checkout flow, Nothing different!) 100$. The Owner of the boat get the notification,and If He is having enough boats, He will Capture(This is where amount deduction happens) the amount to proceed further.
Please get more details by following the below link,
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/authcapture/
Please find the example code below
Please follow the link http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payments/AuthorizePaymentUsingPayPal.html
In the above example, Just note that we are setting Intent "Authorize"
Just remember, In the response you will get "authorization_id".
This is how you have to capture the payment which you authorize from your customer.
http://paypal.github.io/PayPal-PHP-SDK/sample/doc/payments/AuthorizationCapture.html
Note that they are passing "authorization_id" to capture the amount. Once the capture is done, the money will be transferred to Merchant account.

How prevent to buy one item by two customers

I'm selling some stuff on my website using paypal IPN + PDT. I always check how many items are in the stock before payment. After customer makes his order, he is redirected into paypal for make payment. When payment is completed I'm updating database about selling stuff, until this moment I had no problem becouse I was selling unlimited items. I'm not sure what should I do in case where I have for example 10 items for sell, for example in this scenario:
There is last item for sell. Customer makes his order and he is going to pay on the paypal but he didn't payed yet (website still showing that there is one item for sell ), meanwhile customer B see that there is one item left in stock so he is going to buy it too. in this scenario both customers will pay but only one (faster one) get his product.
What I must do to dont make this happen ?
I can't give you a code answer without seeing yours first, but here's how it could be done on paper :
When customer A clicks the "Pay" button, the item quantity is updated in the database
If the payment goes through, do nothing, if the payment doesn't go through (cancelled, incorrect payment informations, etc) then revert the quantity back to the original
This should work fine as long as you do a final "quantity check" when the user clicks the checkout button. Let's say that both customer A and customer B have an item X in the cart, and there's only one left. They can't both pay for the item, since your system would check the quantity before redirecting to Paypal, and as soon as one of the customers do click on the button, the quantity is updated to reflect the purchase.
Drown's answer is right, and I think it's better to reserve the items (reduce them from the stock) for a period of time, for example for 20 minutes.
You need a cron job or something to give back the unpaid items into the stock.
And if you are worried about crawlers you can set another cron job to check those users who have for example 3 unpaid orders with 20 minutes interval among their payments.
You probably can check this out through the orders table in your database. Maybe you need to block these kinds of users for a while or make a better decision about them.

Paypal IPN verified. What to do if I need to refound?

I'm selling from my php site and I accept paypal payments, I've got a limited number of products, buyers have them in their carts, and availability is not enough for them all.
If they pay with paypal at the same time I need to refound one of them.
Is this approach correct, or is it preferable to check availability before the payment IPN notification?
That sounds like a poor user flow. Once you get verification that an item is sold, reduce your inventory in your database. Before sending them to Paypal, verify that you have enough inventory to fulfill their order.
If you get a scenario where say you have one item left and two users were directed to Paypal to purchase it, whoever you receive notification of successful payment first, gets it. The other, you can do a few things:
Place the item on backorder, let the user know when it'll come in with an estimate. When it comes in, send it to them.
Allow the user to choose whether they want the backorder, or to cancel their order, in which case they get a refund
If, once a product sells out, there are none left forever, you can immediately issue a refund.

Pay event fee with paypal and allow guests

I have been hunting around developer.paypal.com for a couple of days now and have the gist of what I need. But I am still looking on the best way to accomplish my task.
What I need is a way for people to pay a fee for an event from my website. I would prefer to allow Guest Checkout as not all attendees will likely have a paypal account yet. But what I would really like is for the paypal website to handle all of checkout. In ebay, you see the total, a small summary and you pay for it right there. I have looked at express checkout, and it wants to return the user to my website to finalize everything.
So in short:
Allow guest checkout
Show payment total on Paypal webpage
Allow payment to be finalized and 'Captured' from PayPal's website, only coming back to my page to say Thanks.
And if possible, not require an address of the attendee
Can this be done?
I have long used StackOverflow for answers, but I am having a hard time finding this answer (mainly because I don't know exactly what I am looking for).
Thanks in advance
You are describing "standard", and the HTML button integration will be much easier than Express Checkout.
Express Checkout is the most robust API to use. The "return" to your site is a good thing, to give the customer the ability to click a final "Place Order" button. But you can also have this triggered automatically on return -- just run DoExpressCheckout without user interaction and display a thank you / confirmation message. If you are going to run DoEC w/o interaction, your initial redirect to PayPal.com should have &useraction=commit appended to the URL. Then, the final button at PayPal.com will say "Pay Now" instead of the default "Continue"
To allow guest checkout with EC, pass SOLUTIONTYPE=Sole in the initial SetEC call. Note that when customers load a PayPal.com checkout page, it checks their browser cookies to see if they have a PayPal email address stored. If they have one stored in the browser, the top "Log in to PayPal" section will be expanded. If they do not have an address stored -- generally meaning this is a brand new computer or they've never used a PayPal account to check out on this one before -- then the bottom guest checkout section will be expanded.
To not require an address, pass NOSHIPPING=1.

PHP - Paypal product timeout

I have finally got my paypal system working using IPN and a reservation system to ensure that two people do not buy the same product.
The problem is, the reservations last for 10 mins on my application. If a user reserves the product the 'timer' starts, he clicks pay and ends up on paypals website. He then leaves the computer for 10 mins and comes back. He then buys it. By now though the reservation is up and it is possible that someone else could have already bought it.
Is it possible to send a time limit with the paypal IPN request to stop this happening?
As far as I know, you cannot specify that a transaction has to close within a certain amount of time with paypal.
However, I see two options you can use:
Offer a full refund if they purchase and the product is not available. You would check during the ipn notification of the purchase and if it is not available, then refund. You might be penalized by paypal if this happens a lot, but I don't have a lot of experience with offering refunds.
You can specify that the button needs to check inventory see "Step 2 – Tracking Inventory With Your Buy Now Button" in the standard payments guide. Once the product becomes sold out, you use the api to notify paypal the inventory is zero (if there is an api, you might have to use the website for this), and they should be able to notify the user there is zero inventory. I don't have experience with this either, but it seems more complicated than #1, and I would probably go with #1 if this didn't happen a lot. I think in the end you still end up having to issue a refund if the user goes through with the transaction even after seeing there is zero inventory, but I'm not sure about the wording in the docs.

Categories