I have created a Direct Payment method with Sage Pay and cards sucsesfully on my website however I seem to be stugling linking with paypal.
I am using the Direct method and using the php kits found here.
http://www.sagepay.co.uk/support/find-an-integration-document/direct-integration-documents
At the moment when a user selects PayPal my site correctly transfers the user to the PayPal site to make the payment, which they do and it then returns them back to my site. With this code.
/?vtx=lockers-PAYMENT-1422281021-294670621
I assume my site is bent to be listening and communicating with PayPal at this point to accept the transaction.
I am really lost where to go now. If anyone has worked with SagePay and Paypal I would really appreciate some pointers.
Regards
Richard
It's not entirely clear where you are going wrong, but it sounds as if once the payment is done and the consumer has been redirected back to your site, you need to send a COMPLETE post back to Sage Pay in order to finalise the process.
Worth checking in the paypal sandbox to check your transactions are appearing and that they are in the expected state (for a standard payment transaction), they will appear as pending until the COMPLETE post is received by Sage Pay (see above).
Related
I have a piece of software that integrates with PayPal payments so my buyers can sell items on their website. So far, my buyers have been English, and IPN listener that works fine.
A buyer in Norway is not getting any IPN response - at least, the usual script for processing the data is failing but at this point I have no way to get server logs to know. The payment goes through fine, but the IPN pings are not being recorded.
The checkout completed pages are different for his language, and also doesn't redirect as normal.
I've looked through BOTH Google and Bing trying to find anything connected with IPN and language but cannot turn anything up.
My question is: My IPN script successfully handles English-language IPN messages. Is it possible that a foregone language is sending different variables or different variable names in the IPN ping?
Thank you so much for your help!
I am running a e-commerce website and I want to integrate PayPal. I need to know immediately whether a user paid successfully or not after they paid via their credit cards. Is there a chance i can do that with PayPal?
I've heard PayPal has a service called IPN, which can post to my server and tell me the transaction's status. But lots of people are complaining that there are huge delays with IPN's PHP API.
Just finished an IPN integration a few hours ago :).
IPN stands for INSTANT payment notifications. In most times it just works(hi Apply fans!).
You add a form with variables such as currency and return URL and with a special page that you expect Paypal to send transaction information when the payment is made. Receiving a notification does not mean funds are sent to your account but the transaction has completed. (possible reasons to not get funds to your account include problems with card provider, incomplete accounts, etc)
You will face some questions regarding specific problems. But I would suggest checking paypal site and it's API docs. They are pretty straight forward and with a little understanding in your programming language and how HTTP works, you can implement it.
I have seen some posts about PayPal IPN system is slow. I have not seen it myself but in most cases, I'm sure you will get paypal API calls just before the user come back to your site.
I've had great success with nSoftware's PayPal plugins.
I'm doing a project involving Paypal, more specifically with the NVP API in PHP. But I just can't seem to figure what to use the IPN feature for.
I mean, when the user has been redirected to Paypal to confirm the purchase, he is redirected back to my website's "Paypal-succes-page", when the transaction is complete. And just to be sure that he actually payed i could use the "PaymentDetails" operation.
Now where does IPN fit in this process? and what is the benefit of it?
Thanks
The integrate with PayPal's services you will notice there are three main channels (and IMO it's important to know this so you can decide the benefits for your application):
IPN: Instant Payment Notification
PDT: Payment Data Transfer
PayPal's API
To use PayPal's IPN you need to add a 'listener' script (example) and add the address to your PayPal account. Whenever an event occurs PayPal will send a message directly to your server via your listener and you then update your accounts appropriately. This is especially useful for running subscription services as events will occur in the background without user intervention and you can capture successful/failed recurring payments etc.
PayPal's PDT is a system for accepting data when a user is redirected back to your site from PayPal. For example, a user clicks 'Buy', they are directed to PayPal, enter information etc. Then, once the payment has been taken, they are redirected back to your site. PayPal can pass details about the transaction including whether it was successful or not so you can display the appropriate success/failed page from your site.
PayPal's API allows you to integrate more deeply with PayPal's services, and you would use this if you were managing payments directly from your site.
These services aren't mutually exclusive, so you can use any combination with your application.
I hope this helps
The IPN feature is a very useful feature which you should use to update your database in my opinion. Sure the user is redirected to your success-page after the purchase where you can validate the payment details.
But what if he closes (by accident or not) the browser before reaching your success page? You will never know the result of the transaction and you will never update your database or process his order accordingly.
When using the IPN you can be sure that the transaction result will always reach you because PayPal will keep on making an offline request to your IPN page until it has reached your servers.
Instant Payment Notification
The typical usage of the IPN is to validate the purchase and to let your script or management system know that the transaction is complete so your system can update any records you may have for your service.
But the most important part is that the transaction is validated.
IPN send all data about transaction to your server - price, items, contacts ... so you can check, if someone don't pay you only 1$ instead of 100$ and confirm your order. It prevets thiefs, cheaters, ... USE IT! ;)
I'm putting sagepay into a PHP powered site.
So far I've had no trouble integrating the Form into the site, their docs are great compared to paypal (mutter mutter)
However I noticed in the dev guide for form integration, they say you can't rely on sagepay sending the customer back every time as they could close the browser, or navigate somewhere else etc.
At the same time, I don't want to move everything out of the user's cart and into an order before I know it's been confirmed / payed for - otherwise if they cancel or the transaction fails somehow on sagepay's end, their cart will be wiped out when they come back, making retrying the transaction a pain for the user, and I will have a duff order polluting my database.
So what I want to know is if there is a way to get sagepay to send a request to the site when something happens with a payment, similar to paypal's Instant Payment Notifications?
EDIT:
Or are they only saying it's patchy because they can't garuantee it, but it works enough of the time to practically rely on it?
Sagepay (AKA Protx) form integration redirects the user automatically once the transaction has completed.
For small sites, i advise my clients to always check the sagepay transaction logs (on the sagepay site) before sending out any goods.
You should be logging the order before they go to Sagepay. Then changing it's "status" to paid when they get redirected back to your site. This gives you a bit more of a paper trail to pick up any possible issues.
If you want a more robust solution. Try Sagepay direct integration. It has more requirements and is harder to integrate but on bigger projects (where you can't manually check orders) it's usually required. Mainly because users can stay on-site without having to go off to Sagepay to make payments.
I have a database where you can select articles etc, users have an account, it's all in mysql and php (i guess you don't need that code).
What i was wondering was how to write a script that allows users to pay online for the articles they selected?
It doesn't need to be any code, just ideas / hints / tips / ... (that are doable in PHP or something similar)
Thanks in advance!!
-Samuel
You have to do that through a service that collects money, such as paypal or a bank.
You make an account there, and they will provide the necessary files and documentation to do that.
Usually it will mean
when the user wants to pay, you redirect them to a specific page in the payment site
you host an IPN (Instant Payment Notification) file where that site will contact you when he receives a payment
I've done some paypal coding before and it is easy to set up, suggest that you should search for payment gateway that, i've work with ipay88.com before its one of payment gateway at my place.
Usually if you setup the paypal for the business transaction you will need to register as merchant account and they will charge you per transaction, same goes with payment gateway.
It is a very broad question. But basically you need to integrate some payment module, such as paypal. Look at their website, where there are tutorials on how to get it working with php.