In Stripe I created a payment link, you can add a response link or redirect link. Now what I want to do is on the redirect link (page) get the response of whether the payment was a success and for which product it was so I can store some data in wordpress database.
I searched the stripe API, but could not find a suiteable solution.
Anyone an idea?
You can add {CHECKOUT_SESSION_ID} to your Payment Link's redirect URL. It will be replaced with the Checkout Session ID after the redirect, and then you can use it to retrieve the Checkout Session from the Stripe API and determine the status of the payment, what was purchased, and so on.
https://example.com/return/url/?session={CHECKOUT_SESSION_ID}
Related
I am working on integration of liqpay payment gateway to site using their available documentation at: https://www.liqpay.ua/en/doc/checkout.
so far I have integrated their checkout method (client-server). user clicks subscribe and it redirect user to liqpay checkout screen. but problem is when user cancel transaction or it is successful user. user just redirect back to given return flag available in their argument list. without any status code or message in url like other payment gateways do.
Need suggestions on it. if someone has experience in working with Liqpay.
While working around in admin panel i found some thing which help me upto some extent. with these settings i was able to get auto redirect to my site as well as some response from API after cancellation and successful payment. and when user cancel transaction it return back with "code" = cancel. attached are the settings and response in case it helps any one.
Settings
Response
I have a website that use can buy points. I use paypal for payment. My method is this.
- After paypal sucess redirect to a success?point=100
- In success page I will add point to user base on the point variable.
- But like this user can type direct in url or refresh the page. It also add point.
My question is how to prevent user type direct in url or refresh
Server language: PHP, Nodejs
Use the redirect page to notify the user that their payment has been completed, but do not take any action from that page.
Instead, set up a PayPal IPN (Instant Payment Notification) endpoint. PayPal will make a request to this endpoint with specific parameters to securely notify you that a payment has been received; use that to update the user's balance. Note that this notification may arrive either before or after the user views the redirect page, depending on how quickly their browser redirects and how long it takes PayPal to verify the payment and call your endpoint.
In magento2, How to redirect after checkout to a link and do payment and land on success page if payment success. if payment failed or cancelled then it will land on failure or cancel page. I am new to Magneto and I'm working on magento2 to develop payment gateway.I'am stuck on front end.When user select PLACE ORDER then it post all data to particular link after transaction done it will land on magento2 page. Please suggest no official doc for magento2.
i found this link https://github.com/magento/magento2/issues/2241
it says that the redirection should be implemented client-side so what you need to do is
create a config provider to load the destination url
bind the "proceed" button of your payment method to some custom redirect action
implement the redirect action via js, using the config provider
look at the paypal express implementation for details, this can be found here: Paypal Express JS
I've got a question about the PayPal transaction system. I try to implement a paypal shopping cart in my website. But what I want to do is I want to have like "PrePaid credits" on my website. So when the transaction successfully processed. A database value will change given the credits the user wanted to buy.
I dont have a idea on what to search for. I only know standard php. Not any modification such as paypal. So can anyone give me a code/website where I can find some usefull code?
Thank you!
PS: If you have any suggestions on the post to make it even clearer please comment.
You would use the PayPal IPN (Instant Payment Notification), so a user would click 'Purchase x credits' on your site (you would have a custom field with the user's ID, it would then take them to PayPal via custom form you put together, that form has a return URL which after the payment has been successfully made, would return them to that URL, and you would make that success return URL update your database with the details.
So on a successful return from PayPal, your page would update the database with the custom value (User ID) we initially passed in the form along with the amount of credits they purchase (this can be passed via custom value OR you could just use PayPal's callback information returned with the query (it'll be posted to your page from PayPal I believe).
PayPal Sample Code
Getting Started with the PayPal IPN
Nettuts - Using PayPal's Instant Payment Notification
I have implemented PayPal Payment with IPN method and its working fine. Its making payments and sends the notification back to merchant site. However, after completing the transaction successfully it doesn't redirects customer to success page URL (merchant website). It stays on paypal and doesn't shows any redirect url.
we refer this url for implementation:
http://www.evoluted.net/thinktank/web-development/paypal-php-integration
Can any one help?
Thanks in advance.
You have to turn auto return On in your PayPal account settings otherwise the return url is ignored