Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Manage Services - Paying w/ PaypalManage Services - Paying w/ Paypal
Previous
 
Next
New Post
11/5/2009 10:28 AM
 

DNN v05.01.04 (3)

I can't get my site and PayPal (sandbox) (mods to code to make Sandbox work (PDF in a Zip file)) to finish communicating a transaction.  I've created the roles I want and when manually applied to a user, the appropriate pages are made available to the user.  I just can't get the "automatic" part of using PayPal to work.

I have gotten as far as getting Palpal to charge the user, but my web site never gets wind of the purchase, so the role isn't applied to the user.

In my searching for answers, I've added three rows to the PortalSettings table (source link):

paypalsubscriptionreturn
paypalsubscriptioncancelreturn
paypalsubscriptionnotifyurl

I've set their SettingValue column to every filename in the /admin/Sales folder (hoping for magic) since I don't have my own pages to point them to.  I've tried empty strings as well.

I've searched the forum for "paypal" and "manage services" and I think I've read all of the results.  What am I missing?

Thanks for any info!
Mark

 
New Post
11/10/2009 12:08 AM
 

Hi Mark,

To make the subscription works, you should log as a Host (SuperUser) and then go to Host > SQL. Paste the following code (with the required changes, see below my explanations) in the text box, select 'Run as Script' and click 'Execute'.

THE SCRIPT CODE:

insert into {databaseOwner}{objectQualifier}PortalSettings ( PortalID, SettingName, SettingValue )
values (n, 'paypalsubscriptionreturn', 'return_url_after_payment');

insert into {databaseOwner}{objectQualifier}PortalSettings ( PortalID, SettingName, SettingValue )
values (n, 'paypalsubscriptioncancelreturn', 'cancel_return_url');

insert into {databaseOwner}{objectQualifier}PortalSettings ( PortalID, SettingName, SettingValue )
values (n, 'paypalsubscriptionnotifyurl', '');

You HAVE to replace the red parts before to paste this script in the text box! Following explanations:

  • n: number of the concerned Portal
  • return_url_after_payment: URL of the page on which the user must be redirected after payment.
  • cancel_return_url: URL of the page on which the user should be referred if clicked Cancel on the PayPal website.

URL parameters have to be fully qualified, like: http://www.yourdomain.tld/path/to/your/page.aspx. If an url parameter is empty, then the home page url is used instead.

Ideally, the return after payment url should be the access page to your services. While the return url on cancellation should be a page on which you have taken care to place a text/HTML module with a text explaining that due to the cancellation your services are not accessible.

Alternatively, you can add those settings directly to the db in the PortalsSettings table.

Last detail, you should not specify an url for the parameter 'paypalsubscriptionnotifyurl', unless you write your own PayPal IPN processing page. Look at the original page code in ...\admin\Sales\paypalipn.aspx.vb.

Finally, you can't use the PayPal sandbox without changing code in PayPalSubscription.aspx.vb in the ...\admin\Sales\ folder. Because the PayPal page url is hardcoded in the code. Use the following url to use the sandbox: https://www.sandbox.paypal.com/cgi-bin/webscr/

EDIT: You have to use the sandbox url in the PayPalIPN.aspx.vb page code too! Whitout this change, the role will be never added because the IPN can't verify and validate the payment.

Remember to log to the developer Paypal website before submit payment to the sandbox!

Gilles


We (team members) are Humans offering their knowledge, their work and their spare time FOR FREE to benefit the community. It would be so particularly appreciated that your messages begin with "Hello" and end with "Thank you" or any other form of politeness. Ask yourself what your reaction would be, if you were approached by me (a total stranger) on the street to ask you something without saying "Hello" nor "Thank you"? After several years of services dedicated to the community, I begin to be tired to read requests without any form of politeness.
 
New Post
11/10/2009 12:34 AM
 

I forgot to mention something! ;-)

If you want to use the sandbox, I suppose your tests are done on your local computer!? In this case, you have to use a dynamic dns service like no-ip or dyndns because the IPN url have to be reached from the outside (by paypal servers). You can't use a test web site with url like: http://localhost/something because 'localhost' can't be found from the outside. Moreover, in most cases, you have to:

  • Open the port 80 (http) on your router and redirect http connections to your local ip address.
  • Add a rule in your firewall to authorize entering http request.
  • Configure IIS to accept the dynamic domain name you chosen.
  • Add the domain to the alias portal list.

Gilles


We (team members) are Humans offering their knowledge, their work and their spare time FOR FREE to benefit the community. It would be so particularly appreciated that your messages begin with "Hello" and end with "Thank you" or any other form of politeness. Ask yourself what your reaction would be, if you were approached by me (a total stranger) on the street to ask you something without saying "Hello" nor "Thank you"? After several years of services dedicated to the community, I begin to be tired to read requests without any form of politeness.
 
New Post
11/13/2009 2:22 PM
 

Thanks for all that work, Gilles.

I had already tried everything you mentioned except the sandbox URL you use (https://www.sandbox.paypal.com/cgi-bin/webscr/) is different.  I was using https://www.sandbox.paypal.com/ and it did (pretend) charge the credit card but it didn't assign the new role to my user.

Am I wrong to think that it should assign the paid role without me having to create the code to do it?  Or am I supposed to manually assign the role to the user once I receive an email from PayPal telling me that the user has paid?  I'm just wondering what DNN is supposed to do right out of the box.

Again, thank you very much.
Mark

 
New Post
11/16/2009 11:50 AM
 

Hi Mark,

First, Can you confirm, than Sandbox url (https://www.sandbox.paypal.com/cgi-bin/webscr/) has been changed inside PayPalSubscription.aspx.vb and PayPalIPN.aspx.vb? You have to use this url in both files to be able to works with the PayPal Sandbox.

Second, can you reach your computer from the Internet using a dynamic dns url? Please ask a friend to test if he can reach your web site using your dynamic dns url from his home. If your computer can't be reached from the Internet, your web site will NEVER receive the notification from PayPal and DNN will NOT be able to add your user to the corresponding role.

Third, did you enabled PayPal IPN at the buyer PayPal Account Sandbox? This last point is important, because  you have to enable the Business account to send Instant Payment Notification (IPN) to your web site. This is related to how PayPal works, not to DNN. Please look at the PayPal documentation for details about IPN.

Most users are confused on how the PayPal Sandbox works. When you create a PayPal Sandbox account (the developer account), two 'test' accounts are created by PayPal. They are used to simulate buyer (Business) and clent (Personal). One of them is the buyer account it should look like: letters_numbers_biz@YourEmailISP.tld. This is the email address you have to use for the 'Processor UserId' setting inside dnn Admin Site Settings when you use the PayPal Sandbox. To operate real transactions, you have to use the email address used to create your real PayPal account. The other one is the client account, it should look like: letters_numbers_per@YourEmailISP.tld. When you use the PayPal Sandbox mode, you have to use this account to log on PayPal to simulate the client when you are redirected to PayPal after clicking on the role link (Renew or Subscribe).

Please log on to https://developer.paypal.com with your developer account informations (ID and Password) and follow these steps:

  • Click on 'Test Accounts' to the top left menu
  • In the account list to the right, you should find at least two accounts (Business and Personal)
  • Select the radio button corresponding to the Business account
  • Click on the 'Enter Sandbox Test Site' button
  • Enter your Business account password to the Test PayPal Account and connect
  • Click on 'My Account' > 'Profile'
  • In the column at right, click on 'Instant Payment Notification Preferences'
  • Now you have to 'Turn On IPN' and enter your dynamic dns url to access to your web site. Use your home page url, dnn will rewrite 'on the fly' to the right url accordingly to your dnn settings. You have to enter a valid url because it's required by PayPal to validate your settings.

By default, DNN add the user account to the corresponding role IF and only if:

  • The paypalsubscriptionnotifyurl setting exist AND is left EMPTY
  • The PayPal IPN is turned ON

Using this settings, the DNN role subsciption works with my DNN 5.1.4 instance and PayPal Sandbox.

Gilles


We (team members) are Humans offering their knowledge, their work and their spare time FOR FREE to benefit the community. It would be so particularly appreciated that your messages begin with "Hello" and end with "Thank you" or any other form of politeness. Ask yourself what your reaction would be, if you were approached by me (a total stranger) on the street to ask you something without saying "Hello" nor "Thank you"? After several years of services dedicated to the community, I begin to be tired to read requests without any form of politeness.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Manage Services - Paying w/ PaypalManage Services - Paying w/ Paypal


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out