Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal WPP Direct Payments & Express Checkout Support


dynamoeffects

Recommended Posts

I added the sections of code below to my checkout_payment.php file.

 

The first section tells the file what defines $ec_checkout and was copied from another file, probably checkout_shipping.php:

 

 // I added in the lines below in an attempt to get special code to work properly
  // it seems to work ok
  $ec_checkout = true;
 if (!tep_session_is_registered('paypal_ec_token') && !tep_session_is_registered('paypal_ec_payer_id') && !tep_session_is_registered('paypal_ec_payer_info')) { 
   $ec_checkout = false;
   $show_payment_page = true;
 } else {
   if (!tep_session_is_registered('payment')) tep_session_register('payment');
   $payment = 'paypal_wpp';
 }

 

The second section instructs the page to skip to confirmation during an EC. This is done so the billing fields are populated during checkout but the user doesn't have to see the unnecessary payment page:

 

//this code added in to manually skip this page for EC
if ($ec_checkout)
{
tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
 }
 //end of extra code

 

So this is a little better. The billing address fields are populated with the customers address rather than leaving it blank.

Edited by djmonkey1

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

hope all are well in the new year. i believe i have surmounted by problems with PEAR in 2005.

and so as '06 gets underway....

 

i am currently getting the following error:

 

---

An error occured when we tried to contact PayPal's servers.

 

Authentication/Authorization Failed

Account is not verified (10002)

---

 

per a post in another thread, "A 10002 error indicates that the API Account Name, API Account Password and API Certificate aren't matching."

 

I delete and recreated my API cert, uploaded the new cert, entered the new info on the OSC admin side, but still get the same error regardless if the module is set to live or sandbox. Can anyone suggest additional elements that I should examine? Thanks.

 

 

solved. the error message speaks for itself.

 

for those with 10002 errors: A 10002 error indicates that the API Account Name, API Account Password and API Certificate aren't matching, OR that your paypal account has not been verified (linked to a bank account).

Link to comment
Share on other sites

I've run into a problem I'm not sure how to fix..

 

My shop is live but not in use yet until I finish adding more products and finish up other pages. But it is online on my server.

 

Testing buying a product selecting the Paypal EC button works and completes perfectly.

 

But if I add something to the cart and then login as a customer then click checkout bringing me to checkout_shipping.php. Then decide instead of clicking paypal ec I want to use another payment method instead so I then fill in the shipping address and click continue to Continue Checkout Procedure the checkout_shipping.php page is loaded again.

 

I assumed if I did not choose paypal ec to check out and filled in the shipping info after clicking continue I would be directed to the next page in checkout procedure which I suppose would be where I choose my payment method.

 

My shop is set up with only two payment modules installed. Check/money order and WPP Direct Payments & EC.

 

From looking over the checkout_shipping.php the continue button that keeps reloading the checkout_shipping.php page instead of going on to the next step in the check out procedure is this below --

 

checkout_shipping.php

around line 506

 

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
			<td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

 

I'm still a total newbie to osc and php so I could be wrong but looks to me as if the button_continue.gif isn't associated with a link to go on to the next step.

 

How ever if you are on the store front side and click this same continue button the link is clickable and links to checkout_shipping.php which in turn just reloads the checkout_shipping.php page instead of moving on. Is there maybe a mistake in the code posted above by not having a link in it? What would the next page in the checkout procedure be? checkout_payment.php?? If the link should be there how do I add it into that line?

 

Any ideas would be so helpful and appreciated -- Mindy

 

Link to the store is here at this time there is only one product and it's located in the Accessories category. Figured one item was enough to start testing before I added them all in. Feel free to create dummy accounts but the paypal part is live so anything checked out through there will go through.

Link to comment
Share on other sites

I've run into a problem I'm not sure how to fix..

 

My shop is live but not in use yet until I finish adding more products and finish up other pages. But it is online on my server.

 

Testing buying a product selecting the Paypal EC button works and completes perfectly.

 

But if I add something to the cart and then login as a customer then click checkout bringing me to checkout_shipping.php. Then decide instead of clicking paypal ec I want to use another payment method instead so I then fill in the shipping address and click continue to Continue Checkout Procedure the checkout_shipping.php page is loaded again.

 

I assumed if I did not choose paypal ec to check out and filled in the shipping info after clicking continue I would be directed to the next page in checkout procedure which I suppose would be where I choose my payment method.

 

My shop is set up with only two payment modules installed. Check/money order and WPP Direct Payments & EC.

 

From looking over the checkout_shipping.php the continue button that keeps reloading the checkout_shipping.php page instead of going on to the next step in the check out procedure is this below --

 

checkout_shipping.php

around line 506

 

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
<td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

 

I'm still a total newbie to osc and php so I could be wrong but looks to me as if the button_continue.gif isn't associated with a link to go on to the next step.

 

How ever if you are on the store front side and click this same continue button the link is clickable and links to checkout_shipping.php which in turn just reloads the checkout_shipping.php page instead of moving on. Is there maybe a mistake in the code posted above by not having a link in it? What would the next page in the checkout procedure be? checkout_payment.php?? If the link should be there how do I add it into that line?

 

Any ideas would be so helpful and appreciated -- Mindy

 

Link to the store is here at this time there is only one product and it's located in the Accessories category. Figured one item was enough to start testing before I added them all in. Feel free to create dummy accounts but the paypal part is live so anything checked out through there will go through.

 

First thing to figure out is how does the continue button know where to send you? The code that you posted is ok, but that button is part of a form. If the form is malformed then you can have problems.

 

Also, if the form is ok, maye there is something on checkout_payment.php that redirects you to checkout_shipping.php if something is missing, not performed properly, etc. For instance, in a stock osC we see this:

 

// if no shipping method has been selected, redirect the customer to the shipping method selection page
  if (!tep_session_is_registered('shipping')) {
 tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
  }

 

so, if for some reason checkout_shipping.php is not registering the shipping session, you'll get pushed back. Since EC bypasses this you wouldn't have a problem with that kind of checkout.

 

It's impossible to tell by using your site what the problem is, but these two ideas might get you started.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

It's impossible to tell by using your site what the problem is, but these two ideas might get you started.

 

Stew

 

As always thanks again for all the help, so many of us would be lost here without you!!

 

I tried to think of what I could have added to the site to cause this problem after going over your suggestions. Turns out when I added a contribution Zero/No Weight = Free Shipping to hack the Free Shipping from a dollar amount to weight the instructions in that hack had me remove a section of code from checkout_shipping.php.

 

Once I removed the hack and replaced the chunk of code that it instructed to remove all is great and working again. Now it's back to the drawing board to figure out a way to allow free shipping or no shipping for greeting cards etc.

 

Thanks -- Mindy

Link to comment
Share on other sites

Once I removed the hack and replaced the chunk of code that it instructed to remove all is great and working again. Now it's back to the drawing board to figure out a way to allow free shipping or no shipping for greeting cards etc.

 

But you still have to get the shipping info, correct? So you would want to still show the shipping page. And if someone ordered greeting cards and a t-shirt, say, then it still works (shipping is charged for the shirt but not the cards). It might be overkill, but Multi Vendor Shipping can do this. It's a HUGE mod but very powerful when it comes to shipping options (right now I've got my shop set up to quote UPS and sometimes FedEx as well for some classes of goods, free shipping for another, and flat rate for the rest). Also, I believe there may be simpler contributions to achieve this (Zero Weight Skips shipping is one, but it does kind of pin you down with a mixed order). Dig around, you never know what you might find.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

But you still have to get the shipping info, correct? So you would want to still show the shipping page. And if someone ordered greeting cards and a t-shirt, say, then it still works (shipping is charged for the shirt but not the cards). It might be overkill, but Multi Vendor Shipping can do this. It's a HUGE mod but very powerful when it comes to shipping options (right now I've got my shop set up to quote UPS and sometimes FedEx as well for some classes of goods, free shipping for another, and flat rate for the rest). Also, I believe there may be simpler contributions to achieve this (Zero Weight Skips shipping is one, but it does kind of pin you down with a mixed order). Dig around, you never know what you might find.

 

I actually spent a good bit of time searching the contributions and the forum for an idea. What I ended up doing was simple and I couldn't believe it took me so long to figure out.

 

I'm using table rate for shipping based on weight. I simply set all my items that don't require shipping charge with a weight of zero. Then added 0:0.00 in my table rate. Now if a customer purchases a greeting card set to 0 weight along with say 1 purse. The shipping amount for the card is 0 but the shipping charge for the purse with a weight of 2 pounds is displayed. Long story short greeting cards ship free and items that need shipping cost are charged. Shipping page is still shown and after testing about 10 test orders with different item ship fee combos it works! Will surely look into MVS though thanks for the heads up.

 

-- Mindy

Link to comment
Share on other sites

Hello,

I have been using this great contribution on 3 stores and everything is working just fine. :thumbsup:

What I think is that it is a great job, but we still have the problem of long checkout process.

I just search this thread to see if anyone had done anything for decreasing the number of clicks with this contribution but I couldn't find any.

Does anybody have any idea on how to decrease the checkout process with this contribution (for example combining the payment and shipping page, combining)

Thanks again for any comments.

Regards,

Link to comment
Share on other sites

Hello,

I have been using this great contribution on 3 stores and everything is working just fine. :thumbsup:

What I think is that it is a great job, but we still have the problem of long checkout process.

I just search this thread to see if anyone had done anything for decreasing the number of clicks with this contribution but I couldn't find any.

Does anybody have any idea on how to decrease the checkout process with this contribution (for example combining the payment and shipping page, combining)

Thanks again for any comments.

 

Good luck with this! There is a contribution called Fast Easy Checkout that combines the payment and shipping pages, but combining the two is not so easy. I tried it at one point but gave up in horror.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Good luck with this! There is a contribution called Fast Easy Checkout that combines the payment and shipping pages, but combining the two is not so easy. I tried it at one point but gave up in horror.

Thanks for your reply.

I know about that contribution and I have already tried it with the same experience that you had. That is why I have posted here to see if any one has any idea on how to do this with PayPal WPP.

Still looking for a resolution on this.

Regards,

Link to comment
Share on other sites

Hi dynamo,

 

I have a new problem... I have the USPS shipping module installed and need to charge tax on S&H. However, when checking out the invoice total reflects the S & H charge correctly, but paypal only receives the tax on the item, not the tax including S & H.

 

Do you have a fix?

 

Brad

Edited by dmason2
Link to comment
Share on other sites

checkout_payment.php

 

can someone send me or post the code to their working checkout_payment.php file?

 

I have an issue with WPP and CCGV not working together if you choose Paypal express. My problem is when selecting Paypal Express you are directed to paypal - enter your user name and redirected back to my store where you select shipping options and then enter a coupon code on the checkout payment page... but the coupon CCGV fields do not show up. (If I choose the direct payment method, CCGV shows up on the page.)

 

I suspect i need to reorder the WWP code before or after the CCGV code in my checkout payments file so that the CCGV fields show up. I cant seem to figure out which part of the code to edit. I am pretty new to php... so an example of someone elses page would help me a lot.

 

help....

 

thanks.

THO.

Link to comment
Share on other sites

okay so after trial and error, i was able to figure that the:

 

<?php

// #################### Added CGV ######################

echo $order_total_modules->credit_selection();//ICW ADDED FOR CREDIT CLASS SYSTEM

// #################### End Added CGV ######################

?>

 

Needs to come before the:

 

<? //---PayPal WPP Modification START ---//-- ?>

<?php if (!$ec_enabled || (!tep_session_is_registered('paypal_ec_token') && !tep_session_is_registered('paypal_ec_payer_id') && !tep_session_is_registered('paypal_ec_payer_info'))) { ?>

<? //---PayPal WPP Modification END ---//-- ?>

 

but now i get this error when confirming payment using express checkout:

 

An error occured when we tried to process your credit card.

 

Transaction refused because of an invalid argument. See additional error messages for details.

The totals of the cart item amounts do not match order amounts. (10413)

 

I suspect that i need to find the discounted order total to send to paypal... some how???

 

I will experiement some more... any thoughts are appreciated.

Link to comment
Share on other sites

I have a problem.

i use a sandbox account to test buying a product selecting the Paypal EC button works and complete perfectly.

But when I add something to the cart and then login as a customer then select direct payment, i input the info of the same credit card and then click "continue". there is a message-"The credit card information you entered contains an error. Please check it and try "

at first, i think i input wrong info, i check it. it's right. i click continit again. it show the message again. then, i open a new sanbox account. the same problem happened.

then I check the code. the message come from here.

if ($ec_enabled && $messageStack->size('payment') > 0) {

?>

<tr>

<td><?php echo $messageStack->output('payment'); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); echo "this is a test"; ?></td>

</tr>

i think it should be transported by paypal.

i was puzzled.

could anybody tell me what's wrong?

thanks in advance.

Link to comment
Share on other sites

I am using wpp with the purchase without account feature, which seem to be working fine together. I have an error that keeps coming up when the customer clicks on the 'Checkout with PayPal' button.

 

Warning: main(includes/languages/english/FILENAME_EC_PROCESS): failed to open stream: No such file or directory in /home/user/public_html/catalog/ec_process.php on line 10

 

Warning: main(includes/languages/english/FILENAME_EC_PROCESS): failed to open stream: No such file or directory in /home/user/public_html/catalog/ec_process.php on line 10

 

Fatal error: main(): Failed opening required 'includes/languages/english/FILENAME_EC_PROCESS' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user/public_html/catalog/ec_process.php on line 10

 

 

I am relatively new to oscommerce, so I do not know much about .php, etc. Can someone please point me towards a solution? I would really appreciate it. This is the only thing keeping my site from being almost 100% ready to go! Thank you!

Link to comment
Share on other sites

I am using wpp with the purchase without account feature, which seem to be working fine together. I have an error that keeps coming up when the customer clicks on the 'Checkout with PayPal' button.

 

Warning: main(includes/languages/english/FILENAME_EC_PROCESS): failed to open stream: No such file or directory in /home/user/public_html/catalog/ec_process.php on line 10

 

Warning: main(includes/languages/english/FILENAME_EC_PROCESS): failed to open stream: No such file or directory in /home/user/public_html/catalog/ec_process.php on line 10

 

Fatal error: main(): Failed opening required 'includes/languages/english/FILENAME_EC_PROCESS' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user/public_html/catalog/ec_process.php on line 10

I am relatively new to oscommerce, so I do not know much about .php, etc. Can someone please point me towards a solution? I would really appreciate it. This is the only thing keeping my site from being almost 100% ready to go! Thank you!

 

The way to troubleshoot this problem is to look at the file and line that the error messages point to. I opened up a copy of ec_process.php and found this on line 10:

 

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_EC_PROCESS);

 

This line is trying to check for the presence of a file whose name is constructed from two static variables, DIR_WS_LANGUAGES and FILENAME_EC_PROCESS, plus a dynamic variable $language. PHP uses the variable name in the result if the variable is not defined, so your problem is that FILENAME_EC_PROCESS isn't defined. See the error messages; the file it is trying to open is 'includes/languages/english/FILENAME_EC_PROCESS'.

 

Filenames are defined in the file includes/filenames.php. Both PWA and WPP include versions of this file as part of the installation. They add different file names to the standard filenames.php. You may have added the one from PWA last, so you need to add the following lines to includes/filenames.php.

 

//---PayPal WPP Modification START---//
 define('FILENAME_EC_PROCESS', 'ec_process.php');
 define('FILENAME_PAYPAL_WPP', 'paypal_wpp.php');
//---PayPal WPP Modification END---//

 

Add them near the end of the file, before the "?>" that closes the PHP code.

 

 

--Glen

Link to comment
Share on other sites

The way to troubleshoot this problem is to look at the file and line that the error messages point to. I opened up a copy of ec_process.php and found this on line 10:

 

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_EC_PROCESS);

 

This line is trying to check for the presence of a file whose name is constructed from two static variables, DIR_WS_LANGUAGES and FILENAME_EC_PROCESS, plus a dynamic variable $language. PHP uses the variable name in the result if the variable is not defined, so your problem is that FILENAME_EC_PROCESS isn't defined. See the error messages; the file it is trying to open is 'includes/languages/english/FILENAME_EC_PROCESS'.

 

Filenames are defined in the file includes/filenames.php. Both PWA and WPP include versions of this file as part of the installation. They add different file names to the standard filenames.php. You may have added the one from PWA last, so you need to add the following lines to includes/filenames.php.

 

//---PayPal WPP Modification START---//
 define('FILENAME_EC_PROCESS', 'ec_process.php');
 define('FILENAME_PAYPAL_WPP', 'paypal_wpp.php');
//---PayPal WPP Modification END---//

 

Add them near the end of the file, before the "?>" that closes the PHP code.

--Glen

 

Thank you very much for not only helping me fix my problem, but explaining the process of how and why as well. As a beginner, this was extremely helpful. Perhaps this will help me fix my own problem next time! Thanks again!

Link to comment
Share on other sites

Hi, I am integrating WPP with the LoginBox contribution and having a problem that the LoginBox on the right column still shows up when the client returns from PayPal EC.

 

I tried to mimic:

 

// WebMakers.com Added: Do not show if on login or create account or PWA screen

if ((!strstr($_SERVER['PHP_SELF'],'login.php'))
and
(!strstr($_SERVER['PHP_SELF'],'create_account.php'))
and
(!strstr($_SERVER['PHP_SELF'],'Order_Info.php'))
and
(!strstr($_SERVER['PHP_SELF'],'Order_Info_Process.php'))
and
(!tep_session_is_registered('customer_id')))
{

 

and add the following to the above:

 

and
(!strstr($_SERVER['PHP_SELF'],'ec_process.php'))
and
(!strstr($_SERVER['PHP_SELF'],'paypal_wpp.php'))

 

to no avail.

 

I am not sure what I have done wrong. It would be greatly appreciated if someone can point me in the right direction. Thanks!

 

Ken

Link to comment
Share on other sites

Hi, I am integrating WPP with the LoginBox contribution and having a problem that the LoginBox on the right column still shows up when the client returns from PayPal EC.

 

I tried to mimic:

 

// WebMakers.com Added: Do not show if on login or create account or PWA screen

if ((!strstr($_SERVER['PHP_SELF'],'login.php'))
and
(!strstr($_SERVER['PHP_SELF'],'create_account.php'))
and
(!strstr($_SERVER['PHP_SELF'],'Order_Info.php'))
and
(!strstr($_SERVER['PHP_SELF'],'Order_Info_Process.php'))
and
(!tep_session_is_registered('customer_id')))
{

 

and add the following to the above:

 

and
(!strstr($_SERVER['PHP_SELF'],'ec_process.php'))
and
(!strstr($_SERVER['PHP_SELF'],'paypal_wpp.php'))

 

to no avail.

 

I am not sure what I have done wrong. It would be greatly appreciated if someone can point me in the right direction. Thanks!

 

Ken

 

It's because paypal.wpp and ec_process.php aren't pages that the customer sees, rather PayPal Express Checkout is a process that the customer can go through when checking out.

 

Try this:

 

and
(!$ec_checkout)

 

If that doesn't work by itself, add this into the code for the login box:

 

$ec_checkout = true;
if (!tep_session_is_registered('paypal_ec_token') && !tep_session_is_registered('paypal_ec_payer_id') && !tep_session_is_registered('paypal_ec_payer_info')) { 
  $ec_checkout = false;

 

I think that might get you started.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

That last part should be

 

$ec_checkout = true;
if (!tep_session_is_registered('paypal_ec_token') && !tep_session_is_registered('paypal_ec_payer_id') && !tep_session_is_registered('paypal_ec_payer_info')) { 
  $ec_checkout = false;
}

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

I followed the instructions after backing up and believe I got this installed properly. However, when I go to checkout, when it goes to connect to the https://www.<domain>.com/checkout_shipping.php page, it literally boots me over to http://www.<domain>.com/admin/login.php

 

When I turn SSL HTTPS off in the configure.php found in /includes/ then it sends me to the correct client login.php page (not the admin).

 

Very strange, any idea why this would happen or how to fix it?

Edited by KuJaX
Link to comment
Share on other sites

I followed the instructions after backing up and believe I got this installed properly. However, when I go to checkout, when it goes to connect to the https://www.<domain>.com/checkout_shipping.php page, it literally boots me over to http://www.<domain>.com/admin/login.php

 

When I turn SSL HTTPS off in the configure.php found in /includes/ then it sends me to the correct client login.php page (not the admin).

 

Very strange, any idea why this would happen or how to fix it?

 

Sounds like a problem with includes/configure.php.

 

The first seven lines should look something like this:

 

define('HTTP_SERVER', 'http://www.domain.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://www.domain.com'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.domain.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.domain.com');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...