News:

Looking for documentation? Take a look on our wiki

Main Menu

Paypal sandbox - anyone have an accurate quick test guide?

Started by Dog_Guy, June 08, 2011, 10:32:09 AM

Previous topic - Next topic

Dog_Guy

Hi,

reading the VM doco, it is very brief on how to use paypal api

I am trying to find out the right configuration setting for it.

then how to test it using sandbox.

I now have a real paypal account and a paypal sandbox account. the documentation for sandbox talks about using html coded buttons, as opposed to a button actually existing on the VM page.

Does anyone have a quick guide on how to use sandbox for testing with VM purchases?

my shop is fairly simple, i just have some dog treats which people buy, and pay for using paypal. I dont have any other payment method yet because i have heard banks merchant fees are a real hassle. Be good to get at least one payment option working!
You can buy healthy dog treats from either of my sites: http://www.dogwalkersmelbourne.com.au/ or http://www.healthydogtreats.com.au/

Dog_Guy

While I appreciate the free nature of this product, I am quite suprised by the number of issues people are finding with an apparantly 'stable' product.

The things I need to do are simple. Calculate postage and get payment. These are core reasons for shopping carts existing. Even if they did work for basic requirements, there seems to be no genuine documentation with simple screenshots as to how paypal configuration should be set up, then how to simply test it in sandbox mode.

How are there 3 million people using a product that doesn't seem to work? As a by the way, I make this comment after trying to get explanations etc over the last two weeks or so. This is two weeks of lost revenue. I guess we get what we pay for ... still I have invested so much time in getting this up and running I am loathe to abandon it just yet, maybe someone will be inspired to fix the problems and create a simple manual?

who knows?
You can buy healthy dog treats from either of my sites: http://www.dogwalkersmelbourne.com.au/ or http://www.healthydogtreats.com.au/

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Dog_Guy

Hi Jenkinhill,

Thank you for coming to the rescue again. I think I may have been directed to that post previously, but that was when VM wasn't working at all. I was also concerned that the post was 2005, but if the details (and programming code info) hasn't changed, then all's good.

Do you have any info as to whether to use paypal api or paypal legacy? I put all the keys in for api but it didn't seem to work, so i have started trying to use the legacy, but think that i need to test it. Why doesn't it need any keys as such and why invent a new api version if the old one worked?

the second link reference you provided has the answer:

" The "Test Mode" is ONLY for testing the IPN notify script from the Eliteweaver IPN Test.

ciao, Soeren"

not being a programmer, this means very little to me. Can you test legacy with just making the code change to

$url = "https://www.sandbox.paypal.com/cgi-bin/webscr";

and changing it back after you have tested it?

Maybe making the paypal connection is very hard, but I imagine that if there was just one really thorough explanation of what any of it meant (with screen shots etc) then 99% of these forum questions would go away.

I think I may have to put you on paypal help speed dial over the weekend. thank you for the links!
You can buy healthy dog treats from either of my sites: http://www.dogwalkersmelbourne.com.au/ or http://www.healthydogtreats.com.au/

jenkinhill

I don't think the new API works in all countries - it certainly does not work for everybody. I just use the "legacy" version. Last time I set up PP I did not bother testing, just set it to live, entered the PayPal payment email and it worked....
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Dog_Guy

Hi ,,,

Re the advice links ..

while there is a lot of text. It still doesnt fully explain each action. That is it completely skips "Payment method type:"

what is the default setting the HTML option?

the config page:
It suggest not to use the Test mode ON as this is for developers and has nothing to do with the sandbox.

He also says "You obviously haven't set the Order Status for pending payments to "confirmed"."

So I changed it to "confirmed" even though pending payments logically should be "pending" ???

The first few lines of code in the payment Extra Info box that is in the info links is:

<?php
$url = "https://www.paypal.com/cgi-bin/webscr";
$tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");
$discount_total = $db->f("coupon_discount") + $db->f("order_discount");
$post_variables = Array(
   "cmd" => "_xclick",
   "business" => PAYPAL_EMAIL,
   "receiver_email" => PAYPAL_EMAIL,

Whereas my version has the code starting with:

<?php
$db1 = new ps_DB();
$q = "SELECT country_2_code FROM #__vm_country WHERE country_3_code='".$user->country."' ORDER BY country_2_code ASC";
$db1->query($q);

$url = "https://www.paypal.com/cgi-bin/webscr";
$tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");
$discount_total = $db->f("coupon_discount") + $db->f("order_discount");
$post_variables = Array(
"cmd" => "_ext-enter",
"redirect_cmd" => "_xclick",
"upload" => "1",
"business" => PAYPAL_EMAIL,
"receiver_email" => PAYPAL_EMAIL,

not being a programmer I am not sure how relevant any of the advice he has following this will be (since the code has probably evolved considerably since he wrote the help guide in 2005 and update in 2007

SUCH as his suggestions:

If you don't want your customer to be redirected after confirmation, but still want him to click on "Pay with PayPal", change
Code:
if( $page == "checkout.thankyou" ) {
to
Code:
if( false ) {

+++++ and more so, why wouldn't I want people to be directed to here if this is what they select and their is only one payment option?

These OLD posts raise as many questions as they may have once tried to resolve.

If you have any 2011 links to thorough manuals - that would be great as I get in this forum thread the details that I am asking are beyond what simple post may be able to answer.

I have gratitude for your assistance with an equal measure of frustration with the age and brevity of the help links.

Surely as this is the CORE of what VM is supposed to do, there should be an actual practical manual for people with no experience (ie me).

I do appreciate your help, but this is seriously frustrating.

You can buy healthy dog treats from either of my sites: http://www.dogwalkersmelbourne.com.au/ or http://www.healthydogtreats.com.au/