DNN Problem: Dynamic Registration, Paypal, and User Creation - module

I'm having a problem with the module Dynamic Registration for DNN.
The module is set up with form completion events in such a way that a user gets redirected to paypal and on completion of payment a user gets created and an email is sent out.
I also have it set up so that an email gets sent out on completion of payment, just to test that the module knows when payment has been completed.
I tried going through the process with the payment gateway (Paypal) enabled - the email gets sent out, but the user does not get created. When I disable the payment gateway, however, a user does get created as well as the email is sent out.
Is there something I'm missing here that is making the module not realize it needs to create the user?
The fact that the module sends out the email makes me think that it should also trigger the Uesr Creation event.
Any ideas/hints as to how Dynamic Registration works with Paypal or how I might be able to fix this?

When the user returns to your site from paypal you must have Friendly URL's turned on or the site can't read the data sent back from paypal.

I found the following information at http://www.datasprings.com/Products/ProductForums/tabid/727/forumid/3/tpage/1/view/topic/postid/4581/language/en-US/Default.aspx#4581
When PayPal integration is turned on:
The user is redirected to PayPal based on the information and settings within your PayPal Payment gateway. This includes the PayPal login, sandbox or standard gateway, and payment information/additional parameters.
Completion events do not get fire off initially
How do completed events get fired off?
When PayPal is enabled Dynamic Completion Events need to be ‘linked’ to PayPal IPN codes. In short, this means that you will specify within the PayPal payment gateway section which ‘completion events’ should be fired off basically conditionally upon which IPN code PayPal will send to your registration form.
For example: Maybe you want to setup a completion event to add the user to a security role, but you only want this to happen when the payment is completed. You would first create the completion event, and then you would ‘link it’ within the PayPal payment gateway section under ‘Form Completion Events / PayPal Payment Status’
For example: Maybe you want to setup a ‘Payment failed’ email to be sent to the administrator if a subscription payment fails. You would first create the completion event, and then you would ‘link it’ within the PayPal payment gateway section under ‘Form Completion Events / PayPal Payment Status’

Related

How does one associate a website user with a Paypal subscription?

I am implementing subscriptions to a premium service on a website using Paypal as the payment service. I have successfully created a Catalog Product and Billing Plan through the API, and I am able to get to the payment page on Paypal, but it's not clear how I'm supposed to persist a user identifier through the purchase process.
I assumed it would be something along the lines of passing a user id somewhere, but there's nothing in the Paypal documentation about this. I need to be able to let the user make a purchase and have the Paypal webhook send the confirmation to an endpoint on my site, and that's where I'd expect to get their user id to toggle the subscription on their account on my end.
Is there something I'm missing? There has to be a way to do this cause I'd imagine it's a pretty common use case. If anyone has information or has done this before, I'd love to hear. Thanks.
The only truly secure way I've found when using javascript SDK, is to securely generate a unique custom_id on your server side associated with the user.
Then when you create the buttons, the 'createSubscription' function takes custom_id as a parameter.
Then use a webhook to receive events from your subscription and the custom_id will be present in the body of all BILLING.SUBSCRIPTION events under resource.custom_id.
I am able to get to the payment page on PayPal,
You are vague about what you are doing here. There are multiple ways (and some ways have multiple versions) of accepting subscriptions via PayPal, so it is important that you provide full details about the method you are using.
The time to associate a created subscription ID with a user ID is when it is approved, in the onApprove function if you are using a Smart Payment Button: https://developer.paypal.com/docs/subscriptions/integrate/#4-create-a-subscription

Auth0 : Multistep signup form for paid users

I am using auth0 in my existing regular php web application.
I have free as well as paid users in my site. For free users registration process is simple, I call the create user api which triggers the verification email.
But for paid users I have a multistep form. In first step users enters his information and registered as a free user in application then redirected to payment page. I can not call auth0 reg api after first step as user will get immediately verification email before payment.
If I call it after successful payment then its impossible to track if user bails out(Doesn't fill payment form, but already registered as a free user).
Please suggest what approach I should follow.
Thanks in advance
Make sure that you disabled public signups (this endpoint) and instead are performing the registration of users from your backend through the Management API create user endpoint.
Then you can use the verify_email parameter to indicate that a verification email should not immediately be send after user creation. You could then later use this endpoint to trigger a verification email to be sent after the payment form is completed.
If you have want to achieve best result i think you must follow below step to get rid of this problem:
1. Remove public signups in your application by trying this authenticating signup.
2.Perform the registration of individual user by this way create user's
3.Now you can simply use the verify_email parameter.
This parameter can be easily use post verification email process which prevent the issue of signup/signin before making payment.
Hope you got it & feel free for any help.

BlueSnap Subscription Fail simulation

Is there any way to simulate bluesnap. what happens when a recurring payment fails, for example, if the user doesn't have money on the card in that moment?
Thank in advance :)
BlueSnap offers IPN (Instant Payment Notification) alerts for events such as declined CC charge for a subscription. This type of IPN is defined as "on demand" - which means you will need to register to receive it in the BlueSnap control panel.
https://support.bluesnap.com/docs/on-demand-ipns
Since the IPNs are messages sent over HTTP, you can choose to send them to your server, and configure a receiver for it there. Once the IPN reached your server it can be parsed by your receiver and you can choose what to do with it, for example:
send an automated email to your customer support or accounting department
send an email to the shopper
log the event in your system for later analysis.
IPNs can also be sent manually, thus simulating this event. For you specific case, the IPN for CC_CHARGE_FAILED can by opening a browser with a connection that can access your server, and putting the IPN in the address line. Your receiver will get the information and respond accordingly.
If you already received an IPN for an actual CC charge failure - use that IPN message as is. If you have not yet received such an IPN and in fact you're just starting out and building your own receiver, you should contact BlueSnap merchant support at merchants#bluesnap.com and they'll send you a sample.

Paypal ipn processing and dropdown option/price buttons logic

I read lots of post from various sites including paypal documentations. But I have some quesitons wihch I couldnt solve those. One of them is that how to design the codes after receiving the ipn message. Ofcourse I make my code I am able to optain and process the variables of message. like payment status and I am able to save them into database. But the point is that how should I desing the code to control the payment to overcome my requirements. I know the post become long but I feel the need of this explanation. So I have a site which works with membership with payment. Site is check after login the membership trial is expired or not if it is expired it shows a div in fornt of the site wihch includes the paypal buttons and redirect to paypal payment screen when button is clicked. User shodul have ability to choos membership period like 6 or 12 mounths (by dropdown paypal button). When the user finalize his payment ipn is trrigerd and I get the datas but all my members dont have to have a paypal account so they can use therid credit card directli and if I understand correctly the transfer of money can take some time to be recevied by me. Which time interval I should set the members approved flag is true ? I am confused about this. If I approve him after ipn is sent is there a possibility an error can occure while transferring me. How the process works.
other problem is the dropdown button. when I set option/price button when I click the button an error page is shown after redirecting to my selling page. It does not redirect to the payment page.
Realy sorry for my long post but I dont know how can I descirebethe situtation in a short way
If you need to wait until funds are available, you should test the value of "payment_status" in the verified IPN message for "Completed".
An eCheck can take from 3-5 days for collection (sometimes longer; you can see the estimated hold time in your account) and has payment_status="Pending". Once collected, you will get another IPN message with "Completed".
Note that the user never sees the IPN process. Normally you set up the conditions (in a table or something that is persistent enough), then send the user to PayPal. When the user comes back from PayPal, your code (at the "return_url") checks the table to see if Payment had completed successfully (perhaps a flag, which was set by your IPN handler code that is called by/communicated with PayPal when the user leaves PayPal gracefully).

About paypal express checkout api

In this picture,there are 3 main steps:SetExpressCheckout,GetExpressCheckoutDetails and DoExpressCheckoutDetails,I'm now sure SetExpressCheckout is to be called by myself,what about GetExpressCheckoutDetails and DoExpressCheckoutDetails,is it called by paypal or by myself?
The api is provided to be called by non-paypal I think,but the problem is seems it's redirected to paypal after calling SetExpressCheckout.
(source: paypal.com)
Yes, you are expected to be the one calling these APIs. After you call SetExpressCheckout, you'll get a token back that represents the checkout you're performing. You'll need to use that token and redirect the user to Paypal to approve the payment. After they approve it, Paypal will redirect back to your site and then you can call GetExpressCheckoutDetails and/or DoExpressCheckoutPayment. The GetExpressCheckoutDetails call is useful for getting things like shipping address, etc, since the buyer can set that stuff as part of the approval flow. Once you have all the info you need, the buyer has approved the payment and you're ready to get paid, then call DoExpressCheckoutPayment to get your money.
See the ExpressCheckout docs for an example of a simple integration.