Faulty Luhn algorithm function? - paypal

In my PayPal Pro credit card payment system, I use the Luhn algorithm function given in the first answer to this question. However, I have several US clients who apparently tried to pay with their credit cards and their details were rejected by the function (return false), although my script allows them to try any number of times.
At the same time, I know other clients' CC details were indeed accepted by the function and payments were successful.
I conclude there must be something wrong with the function itself. Is that possible?

To answer your question I'd have to get a look at your function. You didn't include that here for review.
That said, I'm curious why you're messing with that at all..?? If the credit card is invalid the PayPal API will return an error that informs the user of this. Let their system handle it for you. No need to add extra checks of your own.

Related

If I'm using PayPal on my web store, do I need to worry about user's credit card?

I'm trying to find an answer of a general question.
I'm developing a webstore using Paypal (Express checkout) and Sagepay.
So, if in the report paypal confirms that the payment is actually done, e.g.:
PAYMENTINFO_0_ACK = Success
Do I need to worry if the user's card is valid, stolen, 3Dsecurity, etc., or PayPal takes care of all this?
Thanks
Essentially yes. Although I'm not exactly sure about that specific attribute you have given an example of.
If you send the item to the address given on the PayPal transaction and the transaction is not under review or pending, then you have what they call 'seller protection'.
This protects against hacked accounts or stolen card details etc.
It's a little difficult to find out on the PayPal website. https://www.paypal.com/uk/webapps/mpp/paypal-safety-and-security
Edit: If in doubt, contact PayPal. https://www.paypal.com/us/webapps/helpcenter/helphub/home/
Although it is sometimes very difficult to get providers like this to admit liability, it's a little more black and white with PayPal.

Is it possible to send shipping address to Paypal Standard?

I have looked at Paypal's HTML Variables for PayPal Payments Standard very closely
and looked all over the web for an answer. And I'm pretty sure I already know the answer to my own question, but it seems too absurd. So I'm asking just to make sure I'm not missing anything.
I realize this is basically a duplicate to this question, but he was given one stupid answer.
(Update: The stupid answer has been removed, and now there is a very good answer by another user)
I am collecting the customer's billing and shipping addresses on my site. I can send the billing address, but not the shipping address to PayPal.
The reason I want to send the shipping address is to use PayPal's shipping label service.
I realize that I could set the no_shipping variable to 2 to have PayPal prompt for and require a shipping address, but I am using the address they input on my site to calculate shipping costs with USPS' API. So I need to prompt on the site, and I don't want to make the customer fill in their address a SECOND time on PayPal.
So is there a way to make this work?
I need to:
Calculate shipping costs
Print labels
Keep the checkout process simple and fast
The document you reference does actually answer your question, although admittedly it is hard to pull out the specific answer you are looking for from all the possibilities. Look specifically here:
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/#id08A6F0SJ04Y
... under the heading "Overriding Addresses Stored With PayPal."
Or at least, that is the section for passing in a shipping address for PayPal account holders. If you are using PayPal account optional then it's even more complicated, see here:
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_BillingShippingAddress/#id08A9BM00A5Z
Short answer: you can't pass in two separate addresses, but the address you pass is (usually, depending upon several related variables & conditions) treated as shipping address.
Part of the reason this is so complicated is that there are so many variants of checkout flows. PayPal recommends/prefers that you let them collect the buyer's shipping (and billing, where/if required) on their page and they will pass it back to you. (And this is by far the best for PayPal accountholders since they probably have the address(es) on file already with PayPal and thus don't have to type them at all.) But PayPal knows that isn't how every merchant wants to do it so the product is flexible -- to the point of being so complex it is almost incomprehensible at times.

PayPal Pro: is credit card validation really necessary?

Since PayPal charges transactions but not payment authorizations, I was wondering what is the point of doing credit card validation with Luhn algorithm?
I happen to have trouble with CC validation. If it turns out not to be very important, I could simply get rid of it to solve my problem.
I am not sure I understand your question complete, but PayPal does the validation check to validate the data that is attempted to be passed before it passes it to the processor.

Paypal Subscriptions/Recurring Payments

I'm currently putting together a processing script for a website, and have run into a question that I can't seem to find a clear answer to. Paypal's documentation is iffy at best, and I do not use Paypal enough to discern the answer easily from the information they provide.
When a subscription is created through Paypal, they return two notifications in the first instance - subscr_payment, and subscr_signup.
My question is: Do future payments at the set data process as subscr_payment, or as recurring_payments?
Future payments are sent as "subscr_payment"
https://www.paypal.com/cgi-bin/webscr?cmd=p/acc/ipn-subscriptions-outside

How to use the Paypal API in a similar way to Kickstarter

I've had a look at the preapproval API which looks kind of like what I want but not quite.
I need to mimic the way Kickstarter works fairly closely; users are sent to the Paypal site where they sign in and agree a payment then on a certain date the payment either gets taken from their account or, if some conditions aren't met, nothing happens. I know Paypal are 'funny' about some uses, but actual goods and services are for sale so I think it should be OK.
I need many people to be able to contribute to one larger payment; I don't know if there's a way of setting up a something like this inside of Paypal itself or if all the logic should be kept separately and then the Paypal payment triggered on a certain date?
I have answered two questions on quora related to this that you might find interesting about PayPal's recommended approach for crowdfunding projects like this:
http://www.quora.com/PayPal/I-want-to-use-Paypal-for-my-self-hosted-crowdfund-campaign-but-I-heard-they-might-close-my-account-if-theres-too-much-money-coming-in-is-there-a-way-to-fix-this
http://www.quora.com/PayPal/Is-paypal-better-for-crowdfunding-than-amazon-payments-why-or-why-not/answer/Praveen-Alavilli?snids=55404046#ans1382191
Let me know if you have any questions that I can help with.