1.4.1 shop_module WITH PAYPAL...

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by flip-flop »

Sorry, I don´t know this "shop_module WITH PAYPAL" - can´t help you.

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube »

You need a valid paypal merchant account. The address for that account must be set in the preferences of the shop module. It is also possible to get a paypal sandbox account, use the sandbox paypal email address and sandbox url for testing and verification. Then change the url and paypal email to the live account once you know the module is working.
smoke
Posts: 53
Joined: Tue 13. Jan 2004, 13:50
Location: Berlin

Re: 1.4.1 shop_module WITH PAYPAL...

Post by smoke »

thank you for your answer.
do I have to pay a monthly fee for a merchant account?

I created a sandbox account. but again, I am totally lost :(
its quite difficult for me to find this specific url :(
nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube »

No monthly fee, just the per-transaction overhead. The url is on line 34/35 of front.order_process.inc.php found in /include/inc_module/mod_shop/inc folder. Just uncomment the sandbox version and comment the live version, save the file and play.
smoke
Posts: 53
Joined: Tue 13. Jan 2004, 13:50
Location: Berlin

Re: 1.4.1 shop_module WITH PAYPAL...

Post by smoke »

I am too stupid to find the url at the paypal site.
where can I find it? I am really helpless
nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube »

see my previous post for the url and where to change it... both urls are already in the code, just disable one and use the other (depending on your situation).
smoke
Posts: 53
Joined: Tue 13. Jan 2004, 13:50
Location: Berlin

Re: 1.4.1 shop_module WITH PAYPAL...

Post by smoke »

I understand what you are saying, but do I need to change this url if I go real?:

Code: Select all

   $p->paypal_url = 'https://www.paypal.com/cgi-bin/webscr';
smoke
Posts: 53
Joined: Tue 13. Jan 2004, 13:50
Location: Berlin

Re: 1.4.1 shop_module WITH PAYPAL...

Post by smoke »

what I mean is, do I get a special url from paypal I need to insert in this script when I created a merchant account? or how does it work?

here is the link to my testshop:

http://berlinrodeo.com/en/index.php?test
nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube »

This is the live paypal url, you activate the merchant account with a email address; that email address must be entered in the shop preferences under modules shop module in the backend.

Code: Select all

   $p->paypal_url = 'https://www.paypal.com/cgi-bin/webscr';
if you comment that line out and enable the other line (that is already commented out above in the file)
or change the current line to the sandbox:

Code: Select all

   $p->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
the paypal email set in the shop preferences for use with the sandbox will be different from the paypal email used with a live account and this fake merchant account email must be configured inside the sandbox website. If you are using the sandbox for testing, you use the fake merchant email account that you created once you logged into the paypal sandbox website in the shop preferences. You must also be logged into the sandbox website to perform the testing. Otherwise you use the first url above with a real paypal merchant account address set in the shop preferences. you also need to configure the paypal account setting the pages that refer the payment and what the return url is. This method uses IPN Instant payment notification and your paypal account must be configured to accept that protocol.
smoke
Posts: 53
Joined: Tue 13. Jan 2004, 13:50
Location: Berlin

Re: 1.4.1 shop_module WITH PAYPAL...

Post by smoke »

I am logged in as (sandbox)
when I order I get the following error message:

Code: Select all

You have entered unsupported characters for this field. Current available language character types are: European, Chinese, Korean, Japanese, and Thai. Please try again.


I really dont understand what to do?
Am I really that stupid?

php file is set correct:

Code: Select all

	$p->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';   // testing paypal url
in my shop preferences I use the same email like above.
but still, all I am doing leads to errors.

what a day :shock:
Last edited by smoke on Thu 29. Jul 2010, 11:58, edited 1 time in total.
nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube »

sounds like you still need to configure the sandbox test accounts, both merchant and customer, for testing purposes and use the test merchant account in the shop preferences. Then when you go to pay; use the test customer account to make the transaction.
smoke
Posts: 53
Joined: Tue 13. Jan 2004, 13:50
Location: Berlin

Re: 1.4.1 shop_module WITH PAYPAL...

Post by smoke »

I upgraded my real account to a merchant account. I activated IPN (but I am not sure which URL I should enter for notification, but its activated)
I tried to order but still I get the error:

Image

I am really sad, because I dont really know what I am doing wrong :(

would you explain what how I need to set up my paypal account step by step?
my shop preferences and shop_order_process are set correct. I still have no clue where to start looking for the bug :(
smoke
Posts: 53
Joined: Tue 13. Jan 2004, 13:50
Location: Berlin

Re: 1.4.1 shop_module WITH PAYPAL...

Post by smoke »

no idea? :(
smoke
Posts: 53
Joined: Tue 13. Jan 2004, 13:50
Location: Berlin

Re: 1.4.1 shop_module WITH PAYPAL...

Post by smoke »

I finally got it working!

I changed the currency in the shop preferences from € to EUR.
gosh! finally :D what the hell :D

but here is the next thing (never ending story):

the taxes are not correct when delivering data to paypal. before I order everything looks fine, like this:

Total Net: 0,84 EUR
Total Tax: 0,16 EUR
You have to pay: 1,00 EUR


when I log in to paypal it looks like this:

Image

how can this be solved? I hope it can :(
nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: 1.4.1 shop_module WITH PAYPAL...

Post by nebenaube »

Code: Select all

$phpwcms['allowed_lang']      = array('en');     //array of allowed languages: array('en', 'de', 'fr', 'es')
$phpwcms['default_lang']      = 'en';  //default language
$phpwcms['charset']           = 'iso-8859-1';  //default charset 'iso-8859-1'
When logged into you account at paypal, set the language your wesite uses in your account profile
https://www.paypal.com/us/cgi-bin/websc ... e-encoding
mine is set to Western European Languages (including English)

In the IPN preferences set the notification url to :

Code: Select all

http://yoursite_name/index.php?view-cart&shop_order_process&action=ipn
Good catch on the currency mark. Mine is set to $ which doesn't present a problem.
As far as the tax is concerned, I can't see the entire graphic so I'm not sure what you are talking about... There is a bug there in the shop preferences that suggests the taxs are in percentages but they are not, someone labeled it as a percentage but the values used are off by a factor of 100. ( 7% = 0.07) I didn't fix that because no one else to my knowledge has said anything about it.

Also doesn't Paypal do tax and shipping, perhaps you have something already configured there. I recommend reading the manuals at paypal.
Post Reply