Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Validating user's API credentials - Rails, ActiveMerchant, and PayPal Express Gateway

I'm building a marketplace application that uses PayPal Express. I've got a form for sellers to input their PayPal API credentials, but I need a way to validate them by making some sort of call to PayPal.

I'm using the PaypalExpressGateway in ActiveMerchant, and I don't see anything other than the standard purchase controls. Is there any sort of null-operation that can be used?

Any help would be greatly appreciated!

like image 872
Micah Avatar asked Feb 03 '09 21:02

Micah


2 Answers

I am using the TransactionSearch operation for this purpose. By specifying STARTDATE=2100-01-01 00:00:00 it basically results in a no-op.

It will validate the credentials for you, without requiring any additional input from the seller.

like image 182
Niels van der Rest Avatar answered Sep 22 '22 21:09

Niels van der Rest


For security reasons there isn't a way to check if the email is a valid paypal account. You can always make a small transaction and then void it if account validity is really required.

like image 38
vesan Avatar answered Sep 23 '22 21:09

vesan