32 replies [Last post]
pairodimes's picture
Offline
Joined: 12/20/2008
Juice: 6
Was this information Helpful?

Hi guys - I have a read a few threads about creating phone orders and paypal, but I could not find one on my particular situation.

We are trying to figure out if we can Create a Manual Order - on behalf of the customer (like a phone order) - enter it into Ubercart - hit the Process Payment -> and have it charge the card.

We have PayPal Pro - so its a full credit card gateway.

We tried this but it did not seem to actually charge the card - it just determined that the order was paid and set to Processed.

Am I missing something?

Are we forced to enter this in manually on the PayPal Virtual Terminal in order to complete this transaction?

Thank you in advance.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Create Manual Order with Full Payment Processing

Fill out all the info except the CC info. Then on the order view page, click the "Process card" button and enter the CC info there for processing. It sounds like you were using the payments tab, which is more of a log.

gooddesignusa's picture
Offline
Joined: 04/13/2009
Juice: 41
Re: Re: Create Manual Order with Full Payment Processing

sorry for the thread hijack. This is kinda on topic. Say a phone order comes in. You make the order. They rather pay online later. The admin can go to the order and click on process card. But then the admin has to get the CC either by phone or email. I was thinking of another solution. This is my example:

Say I use the "other" payment gateway. The user buys some stuff and the order goes through. The user has a balance left over since they haven't paid yet. They want to pay later. If only I could give them access to the admin/store/orders/#/credit page. Maybe even a copy of that page. The page doesn't even have to be private / viewable to only that user. It just needs to be SSL. That would make it possible for someone else was to pay the balance without having the login / pass for the user.

I'm not too experienced at writing custom modules. But maybe somehow hook into their order history page and allow a button that goes to a process card page. This button would only show up if the balance is >0 obviously. Hopefully Monday I can bring this up with Mike from commerce guys when we talk about a custom module. This might be a better solution that fixes 2 issues i would like to address.

edit: oh yeah forgot to say I'm using paypal wbs pro. Seems like if i was using Authorize.net This wouldn't really be an issue. Since i've seen people mention authorize lets you recharge the card. And i could just use the payment tab to keep the records correct. Not ideal since the store owner has to leave ubercart and login to his merchant. The paypal sandbox is so limited so who knows maybe paypal can do it as well. Sorry for the long post. lol

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Create Manual Order with Full Payment Processing

That's the idea eventually, it just hasn't happened yet. It would be great for people to post payments to orders through the site, and it's a long standing feature request. The code is in place for something like that to happen, it just needs some more love once we come out of a code freeze.

gooddesignusa's picture
Offline
Joined: 04/13/2009
Juice: 41
Good news

Well knowing some code is in place is something nice to hear. Going to talk to mike from commerce guys today around 4 to talk about paying to get some type of pay later module in the works. I know lots of people will benefit from this.

JohnnyKickball's picture
Offline
Joined: 04/29/2009
Juice: 6
Pay Later or 're submit payment'

Did you ever talk to the Commerce Guys? We want to get a pay later and a 're submit payment' option like this. We do delay debit and sometimes the collection fails.

alexey's picture
Offline
Joined: 02/03/2011
Juice: 5
letting users pay for previously created orders

Ryan, sorry to bother you, has anything changed since your last post in this thread? I'm trying to create a workaround to let users pay for previously created orders (full details in my last post on this page). I was wondering if the solution could be already in place in the newer CVS versions of Ubercart?

dapperry's picture
Offline
Joined: 07/10/2010
Juice: 6
How About Web Payments Standard

If I create a manual order there seems to be no way to finish processing it through Paypal Website Payment Standard (My clients only means of accepting payments since their colume of sales are low, and it doesnt warrant paying $30/mo for Pro). Since Standard now accepts credit cards from the customer without an account login, my client would like to process phone orders, and then input the customers card info to finish the job. There is no place to enter credit card info, or finish the payment process. Does someone have a solution, or can point me in the right direction?

BTW - The Paypal Standard works fine if you are creating an order through the shopping cart, but my client needs to be able to customize phone orders with line items.

TIA,

Smiling David

drupal_newbie's picture
Offline
Joined: 11/25/2010
Juice: 38
Re: How About Web Payments Standard

I am in the same boat. Is their way to process phone orders using paypal website payment standard.

Thanks.

dapperry wrote:

If I create a manual order there seems to be no way to finish processing it through Paypal Website Payment Standard (My clients only means of accepting payments since their colume of sales are low, and it doesnt warrant paying $30/mo for Pro). Since Standard now accepts credit cards from the customer without an account login, my client would like to process phone orders, and then input the customers card info to finish the job. There is no place to enter credit card info, or finish the payment process. Does someone have a solution, or can point me in the right direction?

BTW - The Paypal Standard works fine if you are creating an order through the shopping cart, but my client needs to be able to customize phone orders with line items.

TIA,

Smiling David

nigel.waters's picture
Offline
Joined: 07/12/2010
Juice: 20
Re: Re: How About Web Payments Standard

The only way I have found around this is by using http://drupal.org/project/masquerade and logging in as the customer and using http://drupal.org/project/uc_donation to enter a custom amount and going through the checkout process as the customer. This I admit is an ugly workaround. but that is exactly the point of getting a Paypal pro account, so that you can do what you are suggesting.

shopaholic's picture
Offline
Joined: 09/24/2010
Juice: 32
Re: Re: Re: How About Web Payments Standard

My posting (http://www.ubercart.org/forum/support/20853/customer_process_card_after_...) would seem to overlap with this thread.

It's not limited to Paypal. It seems that in general, "process card" simply isn't available for customers (i.e. != administrator) after an order has been created. It seems so natural to have this ability.

Is this a coding challenge or a legal issue (expecting the answer to be "both") ?

arissa's picture
Offline
Joined: 07/15/2010
Juice: 5
Is this functionality implemented?

Hi all,

Thanks all for Ubercart. Is marvellous! I have a similar situation. The users cand ask for a budget to the products and I use the "other" payment gateway to checkout the process and update the status order to "Pending". He rather pay online later. After that the admin review the order and can modify the price and mark the order to payment. Now the user can see the changes and decide if he want to pay. It would be great that the user can pay at this point of the process.

Thanks,
Víctor

nigel.waters's picture
Offline
Joined: 07/12/2010
Juice: 20
Re: Create Manual Order with Full Payment Processing

Where is this at? Anyone have any luck or is this going to be seen in D7?

chx74's picture
Offline
Joined: 12/12/2010
Juice: 20
Manual check out payments

We need to manually add the shipping costs to orders, recalculate the total, email the client to logon and complete the checkout process with the payment gateway (paypal). However the only option we see is Paypal pending and no paypal button to complete the payment?

alexey's picture
Offline
Joined: 02/03/2011
Juice: 5
Delayed payments on automatically created orders

I was wondering if anyone has already implemented a solution for allowing Ubercart users making delayed payments on orders. The specific scenario I have in mind is when an order is created by custom code or an administrator and assigned to a user. The user then logs in, sees a pending order on his 'My account' page and proceeds to pay for it. It seems like this should amount to creating a new permission in uc_credit module (say "pay for own orders"), granting it to the user, then giving users with this permission access to "admin/store/orders/%uc_order/credit" action in the module. However, when I go through the steps described, the user gets a "You are not authorized to access this page." message as well as the following:

"user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /var/www/sites/dtc/smartpitdevelopment.com/subdomains/dtc/html/drupal1/modules/user/user.module on line 515."

This also happens when I grant the user all the possible permissions for the uc_credit module. It seems like the user's permissions are not checked at all, but instead the code in the user module checks if the user's id is 1.

Could anyone tell me if there is something wrong with my logic? Is there a better way to do this? All I need is to redirect the user to admin/store/orders/%uc_order/credit and allow him to enter credit card info.

Thanks in advance.

firewing1's picture
Offline
Joined: 07/07/2009
Juice: 124
Work in progress

My client needed this functionality, so I've been writing a module that enables payments after checkout as well as manual shipping quotes.

I feel I should warn in advance that it's a huge kludge since one basically has to re-implement the entire checkout process, so I'm doing some last minute cleanups and testing. I hope to have the code ready in the next 1-2 days at which point I'll upload it here.

firewing1's picture
Offline
Joined: 07/07/2009
Juice: 124
Here it is

Okay, here is the beta code: http://www.firewing1.com/node/586

I'm going to update that blog post in a day or two with a bit more info, but for now any information about the inner workings of the modules and/or setup instructions are available in the README.txt file. Hope this helps!

grindflow's picture
Offline
Joined: 12/15/2010
Juice: 85
Re: Here it is

if you didn't know it, you're the man... thanks a million for this

grindflow's picture
Offline
Joined: 12/15/2010
Juice: 85
Re: Re: Here it is

One question, hopefully someone can help.... I tried to teach myself this but it's a bit difficult. I'm theming the Invoice template to display a "Pay your invoice" link that goes to mysite.com/cart/checkout/pay/$order_id of the invoice's order. (the path provided by uc_payafter)

What would that look like in the php/ invoice template? would it be much different to add an image and button.

help would be greatly appreciated.... i've already RTFM'd until I started hallucinating

nigel.waters's picture
Offline
Joined: 07/12/2010
Juice: 20
Re: Re: Re: Here it is

I use this in my invoice so it goes directly to my store help page. maybe this will help.

<?php echo t('Do you still need to pay your invoice?'); ?></b><br />
                  <?php echo t('Pay it <a href="!store_help_url">here</a>.', array('!store_link' => $store_link, '!store_help_url' => $store_help_url)); ?>
firewing1's picture
Offline
Joined: 07/07/2009
Juice: 124
template preprocess hook

The key for this one is using a preprocess hook to define a new token that you can use in your template. For an example, take a look at uc_manual_shipping_preprocess_uc_order() in uc_manual_shipping.module:

<?php
/**
* Implementation of hook_preprocess_uc_order().
*
* Override/create tokens prior to processing the email templates.
*/
function uc_manual_shipping_preprocess_uc_order(&$variables) {
 
// [...]
  // Create the pay_url token
 
$url = url("cart/checkout/pay/".$variables['order']->order_id, array('absolute' => TRUE));
 
$variables['pay_url'] = l($url, $url);
  }
 
// [...]
}
?>

This is what creates the $pay_url token that you can use in templates to output an anchor element with the text the same as the href, pointing to the payment page for that order.

This is a good question, I forgot to explain how this part works in the README files... I'll add how to use $pay_url (or how to create additional custom tokens) to the README in the next version!

I've also been able to make some extra modifications over the past few days, once I get through some basic testing to make sure it all works I'll upload the new version along with some sample templates. The changes make these two modules work better with multi-lingual sites as well as support the use of hashtags in the pay URL (similar to the password reset URLs) so the user can either login and then pay or click on the link generated in the email invoice and pay immediately with no additional action required.

grindflow's picture
Offline
Joined: 12/15/2010
Juice: 85
Re: template preprocess hook

So, my first attempt at writing php (imitating really), seems to be missing something:

In the template I've placed:

<p><?php echo t('<strong><a href="!pay_invoice">Click here to pay this invoice!</a></strong>', array('!pay_invoice' => $pay_invoice)); ?></p>

In the uc_payafter.module I did this:

/**
*implment pay invoice hook ().
*/
function uc_pay_invoice(&$variables) {
  $url = url("cart/checkout/pay/".$variables['order']->order_id, array('absolute' => TRUE));
  $variables['pay_invoice'] = l($url, $url);
}

I'm guessing i'm missing something fundamental?

grindflow's picture
Offline
Joined: 12/15/2010
Juice: 85
Re: Re: template preprocess hook

shameless bump

firewing1's picture
Offline
Joined: 07/07/2009
Juice: 124
Hook names

Because of the way the Drupal hook process works, the naming of the function is very important - specifically, "hook" has to be replaced by the module name. So if you want to modify us_payafter, instead of hook_preprocess_uc_order() we would need to write uc_payafter_preprocess_uc_orer():

<?php
/**
* Implementation of hook_preprocess_uc_order().
*
* Override/create tokens prior to processing the email templates.
*/
function uc_payafter_preprocess_uc_order(&$variables) {
 
$url = url("cart/checkout/pay/".$variables['order']->order_id, array('absolute' => TRUE)); // Create the URL
 
$variables['pay_invoice'] = l($url, $url); // Create the token
}
?>

After you clear the caches then the the token will be created, so snippet you posted from the invoice template should start working correctly!

chx74's picture
Offline
Joined: 12/12/2010
Juice: 20
Confiiguration

Hello Firewing1,

Thanks for writing these extra couple of modules for payments. I am trying to implement your modules, but have a couple of problems/questions.

For the moment we are using paypal... When the customer first goes through checkout, he is still being taken to paypal immediately. What I was hoping/needing is that when he is completes check out he is given a message to say he will be sent an email when the shipping has been calculated and will need to come back and pay. is this a configuration mistake on my part? Is the a conditional action for the first time they check out, and then another for the second to pay?

Also, on the cart/checkout/pay/$ORDER_ID pane, the customer could then change his address, but the shipping quote added manually was for the address he initially put in the first part of the checkout process. Perhaps there should be a new payafter pane that is simplified and not use the checkout pane?

firewing1's picture
Offline
Joined: 07/07/2009
Juice: 124
Checkout panes

Hi chx74,

payafter works by essentially emulating a second, duplicate checkout process with an independent configuration from the regular checkout process as opposed to using conditional actions. This allows you to configure your store so that the first checkout process does not ask for any payment, and the second process will. Furthermore, you can enable/disable the different address panes so that the user can input only the shipping address during checkout, and input only the billing address during payment.

From the problem you describe it sounds like you've still got the payment pane enabled on the first checkout, so they're being redirected to PayPal all the time. If you disable paypal temporarily and enable the dummy credit card payment gateway, does the checkout workflow start working as expected?

Cheers,
Stewart

chx74's picture
Offline
Joined: 12/12/2010
Juice: 20
Checkout panes

Hi Stewart,
Thanks for the support. Yes you where right I did have the checkout payment panes still on, but then I have to as I use them in another part of the site where I need the check out as standard for non shippable goods. Is there a way to have the conditional actions select the checkout or payment panes for example if the goods are shippable?
I am also getting a bunch of errors saying emails cannot be sent, so investigating this.
With Paypal I am not getting back the payment confirmation since i installed your modules.
Other than that it works great. Thanks.

chx74's picture
Offline
Joined: 12/12/2010
Juice: 20
Invoice templates

Actually I am having problems with the email templates too. I can only see admin, customer and shipping templates, and the only templates being used are the default one in the uc_orders folders and not the ones in my theme directory. I have renamed as per read me file and flushed caches.

firewing1's picture
Offline
Joined: 07/07/2009
Juice: 124
File list

These are the files you should have in your theme directory in order to get the custom templates working:

  • sites/all/themes/themename/uc_order-admin.tpl.php
  • sites/all/themes/themename/uc_order-customer.tpl.php
  • sites/all/themes/themename/uc_order-request_admin.tpl.php
  • sites/all/themes/themename/uc_order-request_customer.tpl.php
  • sites/all/themes/themename/uc_order-shipping.tpl.php
  • sites/all/themes/themename/uc_order.tpl.php
firewing1's picture
Offline
Joined: 07/07/2009
Juice: 124
Workflow

I do not think there is a way that the checkout panes can be dynamically enabled or disabled at checkout time via conditional actions, so I'm not sure you'll be able to use an immediate payment for non-shippable items and delayed payment for the other products. Also, how would this work if I mixed product shipping types in my cart?

The conditional actions for panes functionality is something that you could add to your site, but it would definitely be a core hack. You'll want to look at the foreach loops in uc_cart/uc_cart.pages.inc where the panes are looped over and loaded if enabled and add your additional conditional action condition checks.

chx74's picture
Offline
Joined: 12/12/2010
Juice: 20
Re: Workflow

Good point about mixing in the cart, but in theory it wouldn't happen, but in practice it probably will. I was using Ubercart for user subscriptions, but perhaps I should use another method for the subscription side? Thanks for the support here again.

zeezhao's picture
Offline
Joined: 04/23/2008
Juice: 969
Re: Here it is

Thanks. +1

firewing1's picture
Offline
Joined: 07/07/2009
Juice: 124
Bug in original post

I just wanted to post that in the original uc_payafter module, there was a typo that prevented users from being able to select the request_* shipping templates in the conditional actions configuration. If you have downloaded this module before 2011-06-08 (or alternatively, check your version for 6.x-1.0) then please upgrade to 6.x-1.1. Thanks, and sorry about the bug.

I don't want to turn this thread into a changelog for the modules either, so I also wanted to mention that I'll post any future update to my blog post.