I have been trying to integrate PayPal payment with a test application I am developing. If successful, I am thinking of leveraging this on my other projects.
So far, I have been able to add the plugin, configure it for Test environment and able to complete a transaction end to end. However, I have a small issue that I want some help or clarification about. Please follow the series of images below for more details:
Button on merchant application (grails application)
Payment page on PayPal test site
Here is the paypal confirmation page for transaction:
After making the payment above, I got a successful message on paypal test site. But when I check the logs and database, there is no notification sent to the grails application at this stage. The payment transaction is still in PENDING state:
Now, when I click on the "Return to merchant" link on the paypal confirmation page, then I redirected to my grails application with a SUCCESS message:
So, the PayPal "SUCCESS" response is sent to the grails/merchant application only after the user hits that link "Return to merchant site". In real life, the users might not want to return to the merchant site everytime. Seeing the confirmation message on PayPal site, they might assume that the transaction is done and may be PayPal does the payment too. But, how do we let the merchant site i.e the grails application know that the PayPal has already shown the user a confirmation message? So that, the user doesn't have to return to merchant site after seeing the Successful message?
UPDATE:
I have tried the IPN simulator upon your advice. I am not quite sure and able to understand how I can send an IPN message to my localhost application. When I tried giving my localhost or 127.0.0.1 on the IPN simulator configuration on my sandbox account, it throws error saying unable to reach the server. I am sure many developers must have tried this using local development machine, but unable to find any resource which gives the steps to use IPN simulator or IPN sandbox response for a localhost development instancE.
You cannot rely on PDT
you have to use IPN
where PayPal send a notification to a page on your website where you have to authenticate, verify several possible issues and save the transaction details
See here fore more info
IPN
Not sure if it written at that link, but you have also to enable such function from your Paypal account indicating the target page on your website.
Related
I am working on integrating CITRUS payment in IOS.I am almost done with the integration and also able to make payment successfully.
But I am facing one issue here and that is when I am calling the citrus page I load's the current page with my order but it look's page with some HTML tag's, please see the image :
And on this page when I click on SUBMIT button then my order get's completed successfully.
So if anybody have faced the same issue and knows any solution for this please help.
This is not an error. It is the test page showing that you need to host the page where response comes. So once you switch to the production keys, this won't be a problem.
In India, RBI (Reserver Bank of India) Mandates that all card payments should go through two-factor authentication.This means the payer will be redirected to an ACS ( Access Control Server) Page where the payer is expected to enter an OTP/Password/ ATM Pin as the case may be.
Citrus Payments have simulated a test ACS Page in their sandbox environment which is shown in the screenshot you attached with the question.
Once you click submit button on this page, you will be redirected to a "return URL" passed in the incoming request.You are required to validate the response send by Citrus once the request arrives on this URL and display the same to the customer.
After successfully integrating iOS PayPal SDK and testing with no-network mode, I created some test users in the app dashboard and switched to sandbox mode. When I try to login I always get this INTERNAL_SERVICE_ERROR as below:
PayPal SDK: Request has failed with error: INTERNAL_SERVICE_ERROR -
System error. Please try again later. (500) | PayPal Debug-ID:
003f3b97339c5 [sandbox, PayPal iOS SDK 2.8.1]
I gave it some time, even a day as the description tell me to try again later but the failure persists. Is there any additional step I should be doing? Or maybe this is not related to my end?
A 500 response indicates a bug in the PayPal backend. In general, debug IDs should be sent to [https://www.paypal.com/mts](merchant support). They can examine the logs for more information and file a problem report with the appropriate internal team.
However, I will bring this case to their attention.
This particular error has to do with your buyer account not being completely set up according to the country it's registered with. Your buyer account needs a Tax ID set up on it in order to be able to process. As for the 500 Error, this was corrected shortly after you posted the question so that a more appropriate error is returned.
I've seen posts that you should use ActiveMerchant for PayPal integration, but I also found this on the PayPal website.I'm struggling with placing what in which file, since I'm totally new to RoR. So I was trying to integrate the PayPal, but am not sure where to place which code.
Should I use active merchant for PayPal integration, or is the Rest-API the best choice. I want people to fill out their username, pay and when successful they receive digital content. So there should be a call with a result and the username.
Do you have a link, step by step, at least including which code I should place in which file, so I get the basics of RoR better.
Standard PayPal Integration with Rails app Active Merchant gem :
step 1:
-> add 'gem activemerchant' in gem file
-> bundle install
step 2:
-> Go to "www.developer.paypal.com" and create an account(also known as Merchant Account) with US address details.
-> It will create two dummy test account for buyer and seller(alias facilitator) in "sandbox.paypal.com".
Ex:
Seller account ---> naveengoud-facilitator#gmail.com
Buyer account ---> naveengoud-buyer#gmail.com
-> To see test accounts details Click on "Dashboard -> Accounts"
-> Now set the password for both test accounts by clicking on profile link
step 3:
-> Go to seller account(i.e, facilitator) profile details and copy the API Credentials i.e, Username, password and signature
Ex:
Username: naveengoud-facilitator_api1.gamil.com
Password: VSPALJ5ALA5YY9YJ
Signature: AVLslxW5UGzEpaDPEK4Oril7Xo4IAYjdWHD25HhS8a8kqPYO4FjFhd6A
-> Set these API Credentials in "config/environments/development.rb" as follows, add the below code with API credentials
config.after_initialize do
ActiveMerchant::Billing::Base.mode = :test
::GATEWAY = ActiveMerchant::Billing::PaypalGateway.new(
login: "merchant_api1.gotealeaf.com",
password: "2PWPEUKZXAYE7ZHR",
signature: "AFcWxV21C7fd0v3bYYYRCpSSRl31A-dRI5VpyF4A9emruhNYzlM8poc0"
)
end
step 4:
-> From here onward follow the Rails cast 145 episode(http://railscasts.com/episodes/145-integrating-active-merchant)
I found the PayPal API documentation to be quite confusing. Also, my application requirements were not satisfied through the API, so I ended up with a rather simple solution.
The solution mainly consists of two components:
PayPal buttons, which I generate on PayPal website and copy the HTML to my website
PayPal IPN notifications, for which I have a simple handler on my website
This is how the whole solution works in detail
For the user to make payments, I use the PayPal Buttons. For this, you just login to your PayPal business account and generate HTML code for buttons which you can copy and paste into your website.
The user can click on these buttons, they will be redirected to PayPal website, they make payments and have a button to come back to your website.
When the transaction is done (either success or failure), PayPal will inform you via PayPal IPN Notifications. I have implemented an IPN handler on my website, which was quite easy to do.
By the time the user returns to my website, in most cases, I would have already got the IPN notification, hence I can show them a success message.
In case the IPN got delayed, I tell the users that it will take a couple more minutes to update their balance and use AJAX to keep querying the server for updates.
Here are some useful references:
PayPal Buttons
Rail Casts on PayPal IPN
If you need, you can also dynamically generate the buttons via the Button Manager API gem
This link will help you to get better understanding on integration of Basic Checkout, Charge Credit Cards and Recurring Payments with paypal in Ruby On Rails application
http://www.gotealeaf.com/blog/basic-paypal-checkout-processing-in-rails
You can find solutions for following concepts,
1) Basic Checkout
2) Charge Credit Cards
3) Recurring Payments
Look at this for rails integration:
https://github.com/nov/paypal-express see the example and wiki
but also here, more in general (less related to Rails):
https://github.com/tc/paypal_adaptive
https://github.com/fnando/paypal-recurring
-
I'm developing a grails app using http://grails.org/plugin/paypal plugin.
I've followed all instructions, configured my app to work with a dyndns (no-ip).
I can access my app from outside my network.
All the payment is correct, if I click on the "back to test's store" link it returns to my site.
The problem is that no IPN are sent to my IPN handler.
In the IPN history I can see all transactions in error state, but no http response code is shown.
It retries 8 times each message.
Notification URL is correct.
What else can I try?
I answer myself,
looks like paypal does not send IPN posts to URL with ports other than 80 or 443
Take a look at the troubleshooting steps I posted here. These may help.
I am new to both paypal and substruct. I trying to integrate paypal with 'Substruct'. The problem I am facing is that the payment status codes are not being updated in the admin panel.
All of them are on Hold even when paypal sandbox successfully confirmed the orders. From the web somebody suggested that the 'notify_url' needs to be set in the confirm order form
Paypal documention says the same as well.
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables
What value should I provide to the notify_url so that the webserver on my machine is notified. BTW my webserver is behind a LAN.
check the substruct documentation # http://code.google.com/p/substruct/wiki/PayPal