I want to integrate my application with Authorize and I need to get the transaction ID to save this information in database. The question is, can I do this with SIM? I know you can set a URL to get back to you homepage, but is it possible to send the transaction ID back to homepage?
You have two options:
Relay Response
Relay Response is a feature available to merchants using Server Integration Method (SIM) or Simple Checkout. It instructs the payment gateway to return transaction results to the merchant using an HTML form POST to a specified URL on the merchant's Web server. A script or program at the URL can be used to create a custom receipt page using the transaction information. The custom receipt page is then relayed back to the customer's browser. Relay Response does not redirect the end user back to the merchant’s server, but relays the page content to the end user instead of displaying the Authorize.Net default receipt page.
Silent Post
This feature allows you to specify a URL, or Web address, to which the payment gateway should copy the transaction response that is sent to the configured Relay Response URL. If you are not using Relay Response, the feature allows you to specify an additional URL to which transaction responses can be posted.
If you're looking for sample PHP code I wrote an article that includes that here.
My recommendation is to use Relay Response as it gives you an opportunity to customize the receipt page your user's see. (Although you can use both as they do not conflict with each other).
(I am the author of both Silent Post articles)
Related
My integration is working fine, even the IPN is returning the information correctly. However, im not able to send the session to the IPN file in order to add the user id to the database in addition to the info returned from paypal(price/transaction_id...).
The session is shared with all other pages and functions in my application except for the notify.php(ipn file).
IPN is a post directly from the PayPal servers to your server. It will not share any session information with users accessing your website, because users and their user agents (browsers) are not involved in the IPN communication in any way.
IPN is a very old, legacy technology that should be deprecated soon and there is no reason to use it with current PayPal checkout integrations, which offer immediate API responses of payment capture successes and failures.
However if you must continue to use the IPN service for some strange reason, the usual method was to include a custom parameter as part of the original PayPal transaction, the value of which will then be passed back as part of the IPN data. This can then be reconciled with web sessions, open orders, or whatever else you need to do.
But again, the best solution is to not use IPN at all and instead integrate the current v2/checkout/orders API, preferably never redirecting users away from your site and using the in context JS SDK approval flow.
I'm integrating Worldpay with a Wordpress site - our customer completes a form on our site and is then sent to Worldpay to make the payment.
Upon success, Worldpay fetches the content of redirect.php from our server and displays it as a success message at secure-test.worldpay.com.
In order to return the customer back to our site a meta-refresh is implemented (if a 200 response code isn't detected by Worldpay they show a default thank you page). I therefore can't save the POST data to a session or similar.
How can I transmit the Worldpay POST data back to our server securely? I don't think that adding the data as URL parameters in the meta-refresh is an option as it would contain personal data.
I am kind of a newbie when it comes to online CC processing integration. I am in the Sandbox at Authorize.NET trying to configure my server to process SIM orders where the payment page form resides on the Authorize.net servers and processes the order. By default it looks like the confirmation is on their sites, and e-mails can be configured to be sent to the buyer and the seller. That is all working in the Sandbox. However, I am trying to capture some of the order and processing information on my server using the relay response. My processing page is accessible on my server, although I must say that I have .htaccess limited intermittently because it is still in development. I turn that off when I am testing.
The error that I am getting is:
An error occurred while trying to report this transaction to the merchant. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.
This transaction has been approved.
It is advisable for you to contact the merchant to verify that you will receive the product or service.
I can't tell if they are POSTING data to my page or not, and I'm not really clear on what goes on the response page and how to parse the response. I am using the PHP SDK provided by Authorize.NET. The rest seems to be working. I am getting e-mails for the buyer and the seller and the order is proccessed but I'm not capturing the information on our server. What I would like to do is bypass their confirmation page, receive the relay response, create a custom confirmation and capture some of the data for our database. I'll keep digging because I made a fair amount of progress just reading the docs. This one is particularly useful.
Thanks.
I figured it out. There was an error on the page giving a "500" error. I have to say, it is a little strange the way they have it set up. They are POSTING to my page, where I am capturing the POST data, writing stuff to a database, and then creating a custom confirmation message, although it must be via a header redirect because it shows up on their server (their domain is in the address bar). It all works, but apparently, any SESSION variable values are not available to my script in that case?
Payal say that IPN can take a while for orders to be relayed. I am wondering if there is a way with the other Paypal APIs to instantly fetch information about an order, the moment the user is redirected to the success URL of my site.
The problem is that only two variables seem to be relayed in the querystring to my success page: token and PayerID.
The reason I want to do this is I want to allow users to complete the checkout process without logging into my site, but then once the order is complete and they're sent to my success page, I want my site to be able to link them to their previous orders as well as this one, which would be extracted from my database.
Can this be done using token and/or PayerID? If so, how? (I'm using the PHP scripts that the Express checkout wizard provides)
IPN is generally pretty much real-time. There are times when it gets a little lagged and can be kind of slow, but it doesn't seem to happen all that much.
That said, the API calls along within your checkout will indeed return lots of good info in the actual response. Your URL only has the parameters you mentioned (token and Payer ID), however, the GetExpressCheckoutDetails response would have all the buyer info you need, and DoExpressCheckoutPayment will return the transaction ID, payment status, payer status, etc. So the DECP probably has the majority of what you're after.
You can use session variables to save GECD response data and DECP response data accordingly and then update your database, send out email notifications, etc. after calling DECP.
The thing is, the payment could end up being "pending" for various reasons. As such, IPN would still be the best way to handle this sort of thing so that you can update your DB and send out one notification for the pending payment being received, and then another update/email once that payment actually clears.
I created a hosted button using a business account and integrated that code with my php application.
I use 'Website Payments Standard' and generated the 'Buy Now Button' using the tool provided in 'Merchant Services' page.
I am using http://sandbox.paypal.com/ to test this.
Configurations in Merchant Profile:
Instant Payment Notification (IPN) is
'Enabled' and 'Notification URL'
given.
Auto Return is On.
Return URL specified (the same given above in notification URL)
Payment Data Transfer is On
Website Payment is Off
PayPal Account Optional: is Off
While creating the button also in the third option I gave the same notify_url.
Transaction happens successfully and gets redirected to my notify_url.
The issue is, $_POST from paypal response in my notified page is empty.
I printed the $_POST in the first line of my notifier page itself. Do I need to add any other configuration? Am I making any mistake?
The data is going to the IPN url. Log the $_POST data to a file from the script at the IPN URL and see what you are getting. I think if you turn off the IPN, you may then get the data on the notify_url (been a while though, not 100% sure on that part).
the notify url is just for receiving the data from paypal about the transaction, it's not a webpage that you can display, because it doesn't happen inside the normal page flow, paypal simple opens a curl command (or similar) to your server and dumps all the data over $_POST
the return url is only used when the user clicks to return to your website.
so don't use the return url for recording the status of the payment, or sending emails, it'll fail badly, always use the notify url for doing that, the return url is just to show the user something pretty after he's paid, or not pretty if it failed