5

I'm using Rails 3.2.13 and I need to integrate with a payment gateway (preferably Paypal).

I've seen the railscasts of Ryan using ActiveMerchant, but I can't get it to work (I'm located in Greece), the error says that the merchant is not available in my country.

I can't actually get API credentials for Greece as shown enter image description here

Is there a way (activemerchant or not) that I can integrate my Ruby on Rails app with Paypal from Greece, in order to accept payments?

Thanks

3 Answers3

4

There are a few railscasts about PayPal as well. Ryan uses the paypal-recurring gem which I've used successfully with an Australian account.

I think you need a Premier or Business account to use the PayPal API and IPNs.

While you're working on the payment processing you'll want to sign up for a PayPal sandbox account so that you know everything is working.

The code required is listed in the gem I linked to, so I'm not going to copy paste it here.

In order to request a single payment I think you can use the request_payment method and skip the create_recurring_profile method. Also, you should double check that the PayPal page users get taken to doesn't say anything about signing up for a subscription.

mind.blank
  • 4,820
  • 3
  • 22
  • 49
  • First, I don't want recurring payments. Also, the sandbox api does not provide API Creds to Greek users :/ – Aggelos Avgerinos Apr 06 '13 at 12:45
  • I'm pretty sure you don't have to create a recurring profile with that gem, you can just ask for one payment. In fact in the railscast Ryan requests a payment (to be paid instantly) and then goes through a separate action to create a recurring profile which starts billing in +1 month. – mind.blank Apr 06 '13 at 12:47
  • Sure, I've updated my answer. Not sure what API creds are actually, I just opened a developer account and then various sandbox accounts with virtual money to mimick the seller and buyers. – mind.blank Apr 06 '13 at 12:52
  • Well,It works for Australia too! but not for Greece as you can see here https://www.dropbox.com/s/xa0yc0c87rs9rcb/Screen%20Shot%202013-04-06%20at%203.56.43%20PM.png – Aggelos Avgerinos Apr 06 '13 at 12:58
1

PayPals Merchant API works only on the countries listed above.

0

here you can find paypal integration from scratch without gem

http://blog.joshsoftware.com/2013/01/08/paypal-payflow-setup-in-rails/

rbinsztock
  • 3,025
  • 2
  • 21
  • 34
  • ask paypal about it seems the best way https://www.paypal.com/worldwide/ but don't use fake country. they will close your account and you will lost your money. – rbinsztock Apr 06 '13 at 13:45