Paypal Standard - time limit - paypal

I am sending customers to Paypal using Paypal Standard and a classic html form.
I need to ensure that customers pay within 10 minutes.
I was hoping to fund a variable that wold allow me to set a datetime beyond which the transaction could not be accepted any more by Paypal.
I went through the variables at
https://cms.paypal.com/mx/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables
I did not find anything
Does anybody know how to set such a time limit?
Thank you

There is not a variable within the PayPal button variables that allows you to set a time limit on how long the buyer has to pay. The only thing that may be close to working for you, and this would also depend on how many buttons you will be creating and having at one time would created hosted buttons on the fly when they are ready to pay. You could use the BMCreateButton API to create the button. Then have your system generate the code on your website so that the buyer can click the button. When the button is created, store it in a database along with a time stamp. Then set your set up to run a cron job every so often, checking the time stamp. If the time stamp is outside of the period of time that you are wanting the buyer to be able to click the button, have your system use the BMManageButtonStatus API to delete the button from your account. This will then prevent the buyer from clicking on it and making a payment with the button.

Related

PayPal immediate payment (intent="sale") expiration time

I'm using the Express Checkout flow with the advanced server integration.
So I reserve items in real time once user has clicked the "Checkout" button and wait for the success\fail response. User can just close the browser tab and it will look like a long payment process (there is no way for the JS code to call the onCancel handler).
So it looks like I don't know if user has closed the browser or just fell asleep. Problem that I can't wait too long (more than ~5 mins) and I want to cancel the payment after this time. And it seems that I can't cancel the Payment myself. So user can come back and pay after N minutes (N > 5) for the item which has been un-reserved and is already out of stock.
This answer says:
user has three hours to approve of the PayPal payment
Answer about 3 hours is a bit old so do we have any fresh DOCS about the immediate payment lifetime? Is it still 3 hours for the REST Express Checkout flow?
3 hours is too long period for me. Is there a way to setup the expiration time or timeout for the payment during creation?
Is there a way to cancel the Payment? Payments API has no reference about it.
You can do a GET on the PAY-XXXX id.
https://developer.paypal.com/docs/api/payments/#payment_get
The response comes with a create_time field. You should be able to check the delta from create_time -> now, and if it's > 5 minutes, don't accept the PAY-XXXX id / cancel the transaction in your database.
Does that work for your use case?
Also note: No money is moved until you call execute, so long as you prevent execute calls for old transactions, you should be ok.
I think it is still 3 hours and there is no way to set it up during the payment creation. But i would assume that buyer cannot pay until he returns back to your site either by approving or without approving. So is it not possible to put a check in between the step where buyer comes back and then call to complete the payment is made?

Create/UpdateRecurringPaymentsProfile - can clients use their PPal Accounts

I have looked around SO for this but I can't seem to find anything like it.
On my service, I wish to charge on a per-month basis depending on how many users my clients have.
So this question is split up into two parts.
What I want to know is it possible for a client to use their own paypal account (without entering any CC details) with conjunction with CreateRecurringPaymentsProfile via the NVP, I have looked through the documentation and can not discern anything. So clearly it is not possible to do it via NPV - From what I've seen so far.
i. If I do an Express-Checkout Subscription, I can do 20% change on total amount every 180 days (I DO NOT want to do this) - I want to be able to get the Profile via the IPN and then modify the monthly amount on as-need basis
ii. There was some mention of Referenced Transactions, but the Documentation is very confusing.
So say there is a way to create a recurring payment subscription via a PayPal Account on the PayPal website, next step is to be able to update the Subscription via UpdateRecurringPaymentsProfile NVP command.
While I am happy to pass on CC details (which already works great), I am just wondering if it is indeed possible create a button, which would create a Subscription - once on success an IPN request is sent back with the ProfileID which I can modify the Billing Amount by NVP.
So TL;DR;
The current flow I have
Register on our website
Enter CC Details
Backend submits the data to PayPal and if passed - continues on.
On any Account modifications, update Profile Monthly Amount Automatically.
The flow I want
Register on website
Click on an Authorize Button Redirected to PayPal
Login to their PayPal Account Create Recurring Profile.
On any Account modifications, update that Profile Monthly Amount Automatically.
edit to add - this is all working now, had to contact and harass PayPal directly for a lonngg time.
I'm a little confused because it sounds like you answered your own question, but then said that's not what you want..??
Express Checkout does exactly what you outlined at the end of your post, and it triggers an IPN just like any other PayPal transaction. You are indeed limited on how much you can adjust the amounts of profiles created with EC, though, just like you mentioned with the 20% every 180 days. If you create profiles with Payments Pro (DoDirectPayment or PayFlow) then you're not limited and you can adjust the amounts however much you need to whenever you need to.
Reference Transactions and Preapprovals may be something to look into as well. I actually wrote an article about what they are and how they differ from each other awhile back that you might be interested in.

Total amount in service order to be asked on paypal as well? How?

Sorry for the confusing title. Here's my problem -- I am using contact form 7 and I have added paypal in my checkout option but how will it able to record the total amount of the service ordered and be asked for payment? Because it just redirects to paypal with a fixed rate that I put upon creating the button. Can anyone help? Thanks.
PS: This is an example.
If someone wants to avail the service on my site and they want an additional service, they select that service and it will add to the total charge and upon clicking the pay now button, it will charge the total amount on paypal then they pay.
You could have your page dynamically populate the amount prior to redirecting the buyer over to PayPal. To be able to do this, you would need to create a non hosted clear text button. Another option would be to create a buy now button and enter in the amount as 0.00, this would prompt the buyer to update the amount before they proceed to make the payment on the payPal page.

Paypal (+ Paypal IPN) - how to change subscriptions for a user?

I am integrating my site with PayPal and PayPal IPN for recurring subscription payments.
Signing up works well, and I'm all good there.
However, I am trying to understand unsubscribing, and I have a big question.
My site offers different plans with different prices and features. I want to be able to change a user's plan when they decide to upgrade or downgrade. I also want to be able to let a user easily cancel their subscription.
My questions:
How do I allow a subscription to be changed?
Is a subscription change a cancel and then a subscribe?
Can I make the cancel seamless, where they don't have to go through paypal? How do I do this? (I have cancel buttons for each of my services, but I would prefer to have cancel be seamless to the user, just in my site).
You can decrease the profile through UpdateRecurringPaymentsProfile. Keep in mind though, that there's a maximum increase of 20% over 180 days.
In short, if you want to decrease the profile, simply call UpdateRecurringPaymentsProfile and adjust the amount to be billed.
If you want to increase the profile, check whether it exceeds 20% of the original amount. If it does, cancel the existing profile and re-initiate the profile creation process (SetEC, GetEC, (DoEC), CreateRP) to create a new one.

How can I(or Paypal) validate post data that is sent to Paypal from a button on my site?

I'm using paypal website standard and passing my order id that is generated on my site via item_number field. I was wondering, how does paypal know that the content in the form has not been altered by user? For example, someone could just change the amount of $10 to $5 and paypal would not not have any way of knowing. I've doe this before with other payment processor, and they make me send them md5 hash of amount and some other data + secret key, but I am not sure if paypal has this?
Based on this article, I believe it depends on whether or not you are using "Payment Data Transfer". If you're just using a button, then you'll need to manually verify the payment amount before shipping. If you're using PDT, you should be able to verify the payment_gross amount sent back in the response from PayPal.
Your right -- in general you can't keep someone from altering your data. If you must use PayPal (yeah, I know, no monthly fee) so far as I know you have three options:
Let PayPal host your button data. But this gives you little control over the process.
Manually verify each transaction, checking price etc before shipping item.
Using their API to receive completed transaction to automatically check data.
Another thing to watch out for is calculation of sales tax. PayPal's approach was too simplistic for our needs, which forced me to take control of the checkout process.
See this link.
you should try to implement it using ipn, pdt is prone to not passing the variables from paypal to your website if the user does not press the "go to store" button. as what others had answered hosting your button would make it secure at the cost of flexibility. Here is a link on the variables that could be altered on hosted buttons https://www.x.com/people/PP_MTS_Haack/blog/2009/11/11/override-variables-for-hosted-and-encrypted-buttons , as you would look into the variables, you cant really change the important ones.