PayPal Money Request automation in mvc 3 - asp.net-mvc-3

I have a button on my page (ASP.NET MVC 3) redirecting to the PayPal service.
I want to automate some process in my system, and I want to allow users to send the Money Request using PayPal.
But, is it possible to pass to the PayPal service (via URL ?) the Recipient's email address, amount and Request payment type (Goods/Services) ?
After the user is logged in, all that fields will be filled in. I'm totally new with that scenario, is it possible ?

You need to create a checkout form in your site and use paypal IPN.
When you create the check out form, you need to store in your database all the values the user gives you. Then send paypal the information you want using the IPN.
The IPN will come back telling you that the transaction was approved or not.
Here is a good tutorial.

Related

Validate uniqueness of email/phone on Stripe checkout page

After Customers checkout from Stripe payment link, We use their filled email and phone to create record/signup in our database on confirmation page. Our business requires that email and phone should be unique. Therefore when some customers enter duplicate detail (email/phone) it causes issues.
Is there a way that we can enforce email address and phone to be unique? Either through some Stripe web hook or configuration on Stripe end.
One way I know I can use is to create my own checkout session with pre-validated email/phone but I want to avoid that.

How to properly secure laravel newsletter subscription?

I have a newsletter powered by an laravel application. It lets subscribers select an area and set some filters to receive mail notifications on new housing for sale.
To solve this in an easy way for the user I did not want to use passwords and a long registration process with names etc. Instead, you just get an email, in that email there is an edit link with a secret token:
https://myapp.com/subscribers/42/edit?token=gwoi6n4ginagrpoargp4ar5gp14a
Would this be considered a safe approach?
When a user clicks the link, it is over HTTPS so it is encrypted, but it will still show in the current browsers history..
Will I get flamed for doing this and if so what are some ways to improve it?
with encrypted data in ssl communications yes it's safe. but in my opinion there is some offers:
1-remove token word from the address.
2- this link should not show the user edit page directly. instead sends arguments to a controller and controller redirects user to a new page with a clean link. just save token in the page for authorizing your user.
3- why not to produce longer (just a bit longer!) tokens?
4- for being safer each link should have an expire time. new link will be sent with each newsletter mail.

How to redirect page on payment gateway to submit payment when admin place an order from back end

When customer create an order on site then page will redirect to selected payment gateway page (world pay payment) to submit payment but i want to same thing in back end when admin create an order then page should redirect to selected payment gateway to submit payment.
How it will be possible.
Please Suggest
Thanks
You need to go to the quote.xml or sales.xml or custom.xml, (It depends on which plugin you are using)
In, you need to change the path to the url (path) you want to display

How to use existing server token with emberjs simple auth

I'm currently implementing this library ember-simple-auth to manage authentication in the emberjs application (shopping cart) that I am currently building.
The difficulty that I encounter is that the library manages authentication rules after logging in very well but not before logging in.
So here is the scenario:
The application must talk to the backend server to retrieve a session token for every user. This is necessary so that the user can save their items temporarily in the server side using session data. Something that you would expect for a shopping cart.
Then when the user is ready to move forward the application will then display the login screen and the user can authenticate themselves to checkout their items.
However, I can't seems to figure out yet how to do this using simple-auth. If I create a custom authenticator that just fetches token id from the server, it will mark the session as authenticated and will not ask for login on the authenticatedRoute.
In general what I'm trying to do are:
Customer visit the website
The application fetches session token from the server
Customer clicks around and saves item into the shopping cart. The data is synced with the server using the session token
Customer ready to checkout and navigates to checkout page
The application intercepts the route and redirect the customer to login route, where the customer can login and resume checkout.
I hope the above information is clear enough. Any hints and help will be much appreciated. Thanks.
I would probably only use Ember Simple Auth from the point on where the user actually logs in. Before that instead of using a session token to identify the basket, I'd probably explicitly create a basket on the server side (POST /basket) and then add to that via a REST interface (PUT /baskets/:id/items or so). That way you're not sharing state between the client and the server and have a clear interface. You also don't need to "abuse" Ember Simple Auth which probably only leads to other problems later on. When the user logs in then, you simply assign the previously created basket to that user and go on.

Magento PayPal module events

I recently set up some automatic scripts to help me manage incoming orders for a Magento store by using observers and Magento events. My problem is dealing with the question when exactly an order is placed and saved in the system depending on the selected payment type.
For example: if someone simply choses prepayment, the order is saved immediately and the customer is automatically forwarded to a success page - so no problems so far.
If a customer pays via Paypal, the whole situation is completely different. After being redirected to PayPal, logging into the account and confirming the payment, the customer is not redirected to the Magento store. He can click on a link to return there which will also forward him to the success page but surely not everybody will do that and the problem is that the observer event I use only executes code if the user lands on that page. (The event I am working with is "checkout_Onepage_Controller_Success_Action").
Therefore I need to know from where Magento gets the information whether a PayPal payment was successful, has been cancelled or whatever. I looked through some of the PayPal controller files under /app/code/core/Mage/Paypal/controllers/ and the only thing that looked close to a possible solution was the function successAction() in StandardController.php. However, this function also seems to be triggered only when a customer choses to return to the Magento store so it doesn't help me.
Does anybody have some experience with that issue?
I figured out a way to work around the problem:
Appearently there are no events in Magento which correspond with incoming payments on PayPal. A possible solution might be to provide a IPN URL which triggers a script as soon as the payment is confirmed but I managed to redirect the customer to my store so I did not have to do that.
In the profile settings of the PayPal account under "website settings", there is an option called "automatic redirect". If this option is enabled and a URL is entered, the customer will automatically be forwarded to that URL. At first I thought this would not help me because as I said there are multiple web shops involved which all would have their own individual return URL and you can't specify more than one. However, if a return URL is passed over when contacting PayPal, it will override the one that is specified within the profile settings and since the Magento module does that by default, I just had to enter a random URL in the textfield and enable the option, now the customers are redirected back to my shop when they place an order and pay via PayPal.

Resources