Problems, need help? Have a tip or advice? Post it here.
30 posts Page 2 of 3
PayPal's JavaScript buttons are simple, but using Couch's built in functions means @KK has already taken care of the IPN and a lot of other details for you.

Following up on @GoingMarryAsap's idea, I think it's better to modify the Couch Cart add-on by adding a new parameter. With this modification, you would add the parameter 'seller' to the pp_payment_gateway tag to change the merchant id. If 'seller' is not specified, the email from the config file would be used.
Code: Select all
<cms:if k_success >
   <cms:pp_payment_gateway
       shipping_address="<cms:if "<cms:pp_count_shippable_items />" >1<cms:else />0</cms:if>"
       empty_cart='0'
       seller="<cms:show pp_email />"                             
   />
</cms:if>

Now, I'm just winging it. This is a pretty simple modification, but I don't have a Couch Cart set up for testing. If you want to try it out, you can let me know if it works.

Change couch/addons/cart/cart.php to cart-old.php (in case you want to revert to the original). Put this file in the couch/addons/cart/ folder and rename it to cart.php to activate it.

Like I said, this is completely untested. I feel a little crummy not having tested it, but setting up the test would take me a lot longer than the modification did. But it looks like it should work... :) Let me know.
Hi Tim,

This is the message i get.

We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at http://www.paypal.com.


Your purchase couldn't be completed
There's a problem with the merchant's PayPal account. Please try again later.


You can go to www.torza.co.uk/selling/index.php

Click on one of the two products and check out. Then the message above appears.

You'll need to login

user demo
password demo123
Well, it could have been worse. At least it went through to PayPal. :lol:

Did you use a valid PayPal account's email address? Assuming you did and there are no syntax errors in your front end code, then I guess something is not working as expected in my mod.

Since you appear to be at your computer working on this, could you test this new file for me? You should get an error that shows what is being sent to PayPal. That may indicate what the problem is. Otherwise, I'll take a little time to set up a test and try troubleshooting it.
:lol: Yeah could of been worse. heres what it's reported.

PayPal string: ?cmd=_cart&upload=1&business=¤cy_code=GBP&rm=1&return=http%3A%2F%2Fwww.tsmsport.co.uk%2F&cancel_return=http%3A%2F%2Fwww.tsmsport.co.uk%2F&item_number_1=377&item_name_1=D2+RACING+TYPE+RS+COILOVER+FOR+11-14+MAZDA+2+%2F+11-14+FORD+FIESTA&amount_1=629.82&quantity_1=1&shipping_1= 0&no_shipping=2
Yep. There's the problem.
&business=¤

Not sure how that happened or even what it means. Thanks for playing along, but it'll never work troubleshooting back and forth over the forum. I'll have to see if I can figure it out from here. I'm sure it can be made to work, though. Does the solution seem to suit your purpose if it were working?
tim wrote: Yep. There's the problem.
&business=¤

Not sure how that happened or even what it means. Thanks for playing along, but it'll never work troubleshooting back and forth over the forum. I'll have to see if I can figure it out from here. I'm sure it can be made to work, though. Does the solution seem to suit your purpose if it were working?


totally understand.
The solution works for me. Long as the seller can advertise his product and receive payment from the buyer that's the main goal.

Thanks for your support so far Tim
I guess I had some sort of syntax error in my mod. :oops: This new file is working in my tests.

Attachments

Umm, am i doing something wrong? it's still showing the same error message this time with the

Code: Select all
<cms:show pp_email />


Untitled-1.jpg
Untitled-1.jpg (31.36 KiB) Viewed 1517 times
okay ignore the top part.

Still having the issues, however still not taking me to the sellers paypal. the current set is
seller_1272492192_biz@gmail.com

however the sellers is press@tsmsport.co.uk



I've uploaded the file cart.php however what is the _MACOSX file. am i adding extra?
Ignore the _MACOSX file. It seems to be a hidden file that snuck into the zip. I downloaded the same zip file you have and uploaded it to my test site. It works for me when I hard-code an email address in the seller parameter.
Code: Select all
<cms:if k_success >
   <cms:pp_payment_gateway
       shipping_address="<cms:if "<cms:pp_count_shippable_items />" >1<cms:else />0</cms:if>"
       empty_cart='0'
       seller="press@tsmsport.co.uk"                             
   />
</cms:if>

When I leave out the 'seller' parameter, it uses the default address: seller_1272492192_biz@gmail.com.
Have you tried hard-coding the address as shown above? Also, make sure that you actually uploaded the new cart.php file in the right place. You'll find this modification at line 714:
Code: Select all
                if( $seller != ''){
                    $qs .= "&business=" . urlencode( $seller );
                }
                else{
                    $qs .= "&business=" . urlencode( $this->get_config('paypal_email') );
                }

The fact that it sends you to the default page suggests that somehow it's not getting the seller parameter. The first error you reported is weird, too, because it seems like Couch didn't parse the tag at all. I'm feeling a little stumped now.

Please check that these things are correct. I can't think of any other reason that this wouldn't be working for you.
30 posts Page 2 of 3