Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

eCommerce Tycoon


You are currently viewing our eCommerce Tycoon as a guest. Please register to participate.
Login



Reply
Custom Payment / Invoice email?
Old 06-12-2012, 05:23 PM Custom Payment / Invoice email?
madnhain's Avatar
Skilled Talker

Posts: 63
Name: Jez
Location: Grand Junction, CO / Williston, ND
Trades: 0
I'm trying to find a way to send customers a custom bill / invoice email with a payment link using paypal (or some other credit card processing platform).

I can already send custom emails to customers from my admin menu, which is basically a PHP script, though I'd like my admins to be able to fill out a form with product description, summery of services, and specific amount to be paid. The email gets sent to customer, with a link to pay that specific amount.

Any ideas?

Thanks!
madnhain is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-13-2012, 05:41 AM Re: Custom Payment / Invoice email?
andrei155's Avatar
CEO of BLD Hosting

Posts: 1,517
Name: Andrei
Location: Canada
Trades: 6
Why not use one of the readily available order and client management scripts.

We use http://whmcs.com/ and it's great. I dont know if what you're currently using is an extension of something, however if it's a standalone order system, I would definitely make the switch. You can literally do everything with WHMCS.

To put things into perspective; You'll be able to create "Packages/ Services" all with their own description/ pricing/ "Package Addons" / Discounts and a bunch of different gimicks. You'll have your customers being sent an e-mail template, which can be modified by you to include whatever you'd like from their assigned user and package profile. For example, you can create a template with flags (such as client name, product name, product description) which will cross reference with the database before being sent out.

If you're looking to create something like that for yourself, then that's what I'd look into - assigning different client content to php variables and running those through an email template.
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting -
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 06-16-2012, 11:05 PM Re: Custom Payment / Invoice email?
madnhain's Avatar
Skilled Talker

Posts: 63
Name: Jez
Location: Grand Junction, CO / Williston, ND
Trades: 0
I'm running my business off Drupal, but the current available modules don't seem adequate for this. I'll look into it, thanks!
madnhain is offline
Reply With Quote
View Public Profile
 
Old 06-17-2012, 12:25 PM Re: Custom Payment / Invoice email?
chrishirst's Avatar
Defies a Status

Posts: 43,963
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Paypal Invoicing
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-28-2012, 01:10 PM Re: Custom Payment / Invoice email?
madnhain's Avatar
Skilled Talker

Posts: 63
Name: Jez
Location: Grand Junction, CO / Williston, ND
Trades: 0
My apologies for the delay in replying, I've been out of town on business.

Thank you for that chrishirst, such an obvious solution escaped me.

Now, for a bit more technical assistance if you would be so kind?
Using the custom paypal button, I'm attempting to send an invoice (using Drupal 7's Ubercart) which if you're not familiar with the invoicing system, it emails the customer an invoice stating the amount owed etc. I can alter the invoice template to accomodate my needs.

The paypal custom button does not have an option to send a custom amount, which is what I'll need because every order from my site will be of a custom amount and it doesn't make sense to make a new custom button for every order processed.
The Order Total is defined in the template at $product->total_price which is the total I will want to pass to PayPal with each invoice.

Here's my php code:
PHP Code:
<?php
$totalprice 
=  $product->total_price;      // grab variable
$total str_replace'$'''$totalprice ); // deformats the number to non-currency
echo $total;          // echo to make sure, delete after debugging
?>
And here's the Custom Paypal Button Code:
HTML Code:
<!-- Added PayPal Custom Button-->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="XXX@XXX.XXX">
<input type="hidden" name="item_name" value="Item Name">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="amount" value="<?php echo '$total'; ?>">
<input  type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif"  name="submit" alt="Make payments with PayPal - it's fast, free and  secure!">
</form>
<!-- End PayPal Custom Button-->
This is not working, and I've tried every possible method I can think of.
*Note that the business value is XXX'd out for personal security on this post.

Thank you in advance to anyone that can help!

Last edited by madnhain; 07-28-2012 at 01:13 PM..
madnhain is offline
Reply With Quote
View Public Profile
 
Old 07-28-2012, 05:07 PM Re: Custom Payment / Invoice email?
chrishirst's Avatar
Defies a Status

Posts: 43,963
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Remove the single quotes from this
PHP Code:
<?php echo '$total'?>">

And does $total return the correct amount?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-28-2012, 07:35 PM Re: Custom Payment / Invoice email?
madnhain's Avatar
Skilled Talker

Posts: 63
Name: Jez
Location: Grand Junction, CO / Williston, ND
Trades: 0
I tried removing those single quotes, and it outputs this after the button:
750.00">

and yes, the $total does output the total accurately minus the currency formatting.

Last edited by madnhain; 07-28-2012 at 07:54 PM..
madnhain is offline
Reply With Quote
View Public Profile
 
Old 07-28-2012, 07:42 PM Re: Custom Payment / Invoice email?
madnhain's Avatar
Skilled Talker

Posts: 63
Name: Jez
Location: Grand Junction, CO / Williston, ND
Trades: 0
below is the "minimum" information for the paypal button as taken from their website if this is helpful.

HTML Code:
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="me@mybusiness.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Teddy Bear">
<input type="hidden" name="amount" value="12.99">
<input  type="image" src="http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif"  border="0" name="submit" alt="Make payments with PayPal - it's fast,  free and secure!">
</form>
When the button is clicked, you are redirected to paypal but recieve this message:

"The link you have used to enter the PayPal system contains an incorrectly formatted item amount."

Last edited by madnhain; 07-28-2012 at 07:49 PM..
madnhain is offline
Reply With Quote
View Public Profile
 
Old 07-29-2012, 08:05 AM Re: Custom Payment / Invoice email?
chrishirst's Avatar
Defies a Status

Posts: 43,963
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by madnhain View Post
below is the "minimum" information for the paypal button as taken from their website if this is helpful.
The PayPal "pay now" form is pretty much indelibly ingrained into my memory


Quote:
Originally Posted by madnhain View Post
When the button is clicked, you are redirected to paypal but recieve this message:

"The link you have used to enter the PayPal system contains an incorrectly formatted item amount."
Ok, look at the rendered HTML source code for the form that your system creates to see if there is anything amiss, or post the rendered code here.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-29-2012, 10:17 PM Re: Custom Payment / Invoice email?
madnhain's Avatar
Skilled Talker

Posts: 63
Name: Jez
Location: Grand Junction, CO / Williston, ND
Trades: 0
Why yes... it does appear to have something amiss... though I'm not sure what would cause it... here it is:
HTML Code:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" value="_xclick" name="cmd">
<input type="hidden" value="xxx@xxxd.out" name="business">
<input type="hidden" value="Item Name" name="item_name">
<input type="hidden" value="USD" name="currency_code">
<input type="hidden" uc-price"="" value="<span class=" name="amount">
780.00"&gt; 
<input type="image" alt="Make payments with PayPal - it's fast, free and secure!" name="submit" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif">
</form>
as far as I can tell the code is correct (though obviously not)
I will paste below the template file's code in its entirety as a reference.

Code:
<?php

/**
 * @file
 * This file is the default customer invoice template for Ubercart.
 *
 * Available variables:
 * - $products: An array of product objects in the order, with the following
 *   members:
 *   - title: The product title.
 *   - model: The product SKU.
 *   - qty: The quantity ordered.
 *   - total_price: The formatted total price for the quantity ordered.
 *   - individual_price: If quantity is more than 1, the formatted product
 *     price of a single item.
 *   - details: Any extra details about the product, such as attributes.
 * - $line_items: An array of line item arrays attached to the order, each with
 *   the following keys:
 *   - line_item_id: The type of line item (subtotal, shipping, etc.).
 *   - title: The line item display title.
 *   - formatted_amount: The formatted amount of the line item.
 * - $shippable: TRUE if the order is shippable.
 *
 * Tokens: All site, store and order tokens are also available as
 * variables, such as $site_logo, $store_name and $order_first_name.
 *
 * Display options:
 * - $op: 'view', 'print', 'checkout-mail' or 'admin-mail', depending on
 *   which variant of the invoice is being rendered.
 * - $business_header: TRUE if the invoice header should be displayed.
 * - $shipping_method: TRUE if shipping information should be displayed.
 * - $help_text: TRUE if the store help message should be displayed.
 * - $email_text: TRUE if the "do not reply to this email" message should
 *   be displayed.
 * - $store_footer: TRUE if the store URL should be displayed.
 * - $thank_you_message: TRUE if the 'thank you for your order' message
 *   should be displayed.
 *
 * @see template_preprocess_uc_order()
 */
?>
<table width="95%" border="0" cellspacing="0" cellpadding="1" align="center" bgcolor="#006699" style="font-family: verdana, arial, helvetica; font-size: small;">
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center" bgcolor="#FFFFFF" style="font-family: verdana, arial, helvetica; font-size: small;">
        <?php if ($business_header): ?>
        <tr valign="top">
          <td>
            <table width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
              <tr>
                <td>
                  <?php print $site_logo; ?>
                </td>
                <td width="98%">
                  <div style="padding-left: 1em;">
                  <span style="font-size: large;"><?php print $store_name; ?></span><br />
                  <?php print $site_slogan; ?>
                  </div>
                </td>
                <td nowrap="nowrap">
                  <?php print $store_address; ?><br /><?php print $store_phone; ?>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <?php endif; ?>

        <tr valign="top">
          <td>

            <?php if ($thank_you_message): ?>
            <p><b><?php print t('Thanks for your order, !order_first_name!', array('!order_first_name' => $order_first_name)); ?></b></p>

            <?php if (isset($order->data['new_user'])): ?>
            <p><b><?php print t('An account has been created for you with the following details:'); ?></b></p>
            <p><b><?php print t('Username:'); ?></b> <?php print $order_new_username; ?><br />
            <b><?php print t('Password:'); ?></b> <?php print $order_new_password; ?></p>
            <?php endif; ?>

            <p><b><?php print t('Want to manage your order online?'); ?></b><br />
            <?php print t('If you need to check the status of your order, please visit our home page at !store_link and click on "My account" in the menu or login with the following link:', array('!store_link' => $store_link)); ?>
            <br /><br /><?php print $site_login_link; ?></p>
            <?php endif; ?>

            <table cellpadding="4" cellspacing="0" border="0" width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
              <tr>
                <td colspan="2" bgcolor="#006699" style="color: white;">
                  <b><?php print t('Purchasing Information:'); ?></b>
                </td>
              </tr>
              <tr>
                <td nowrap="nowrap">
                  <b><?php print t('E-mail Address:'); ?></b>
                </td>
                <td width="98%">
                  <?php print $order_email; ?>
                </td>
              </tr>
              <tr>
                <td colspan="2">

                  <table width="100%" cellspacing="0" cellpadding="0" style="font-family: verdana, arial, helvetica; font-size: small;">
                    <tr>
                      <td valign="top" width="50%">
                        <b><?php print t('Billing Address:'); ?></b><br />
                        <?php print $order_billing_address; ?><br />
                        <br />
                        <b><?php print t('Billing Phone:'); ?></b><br />
                        <?php print $order_billing_phone; ?><br />
                      </td>
                      <?php if ($shippable): ?>
                      <td valign="top" width="50%">
                        <b><?php print t('Shipping Address:'); ?></b><br />
                        <?php print $order_shipping_address; ?><br />
                        <br />
                        <b><?php print t('Shipping Phone:'); ?></b><br />
                        <?php print $order_shipping_phone; ?><br />
                      </td>
                      <?php endif; ?>
                    </tr>
                  </table>

                </td>
              </tr>
              <tr>
                <td nowrap="nowrap">
                  <b><?php print t('Order Grand Total:'); ?></b>
                </td>
                <td width="98%">
                  <b><?php print $order_total; ?></b>
                </td>
              </tr>
              <tr>
                <td nowrap="nowrap">
                  <b><?php print t('Payment Method:'); ?></b>
                </td>
                <td width="98%">
                  <?php print $order_payment_method; ?>
                </td>
              </tr>

              <tr>
                <td colspan="2" bgcolor="#006699" style="color: white;">
                  <b><?php print t('Order Summary:'); ?></b>
                </td>
              </tr>

              <?php if ($shippable): ?>
              <tr>
                <td colspan="2" bgcolor="#EEEEEE">
                  <font color="#CC6600"><b><?php print t('Shipping Details:'); ?></b></font>
                </td>
              </tr>
              <?php endif; ?>

              <tr>
                <td colspan="2">

                  <table border="0" cellpadding="1" cellspacing="0" width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">
                    <tr>
                      <td nowrap="nowrap">
                        <b><?php print t('Order #:'); ?></b>
                      </td>
                      <td width="98%">
                        <?php print $order_link; ?>
                      </td>
                    </tr>

                    <tr>
                      <td nowrap="nowrap">
                        <b><?php print t('Order Date: '); ?></b>
                      </td>
                      <td width="98%">
                        <?php print $order_created; ?>
                      </td>
                    </tr>

                    <?php if ($shipping_method && $shippable): ?>
                    <tr>
                      <td nowrap="nowrap">
                        <b><?php print t('Shipping Method:'); ?></b>
                      </td>
                      <td width="98%">
                        <?php print $order_shipping_method; ?>
                      </td>
                    </tr>
                    <?php endif; ?>

                    <tr>
                      <td nowrap="nowrap">
                        <?php print t('Products Subtotal:'); ?>&nbsp;
                      </td>
                      <td width="98%">
                        <?php print $order_subtotal; ?>
                      </td>
                    </tr>

                    <?php foreach ($line_items as $item): ?>
                    <?php if ($item['type'] == 'subtotal' || $item['type'] == 'total')  continue; ?>

                    <tr>
                      <td nowrap="nowrap">
                        <?php print $item['title']; ?>:
                      </td>
                      <td>
                        <?php print $item['formatted_amount']; ?>
                      </td>
                    </tr>

                    <?php endforeach; ?>

                    <tr>
                      <td>&nbsp;</td>
                      <td>------</td>
                    </tr>

                    <tr>
                      <td nowrap="nowrap">
                        <b><?php print t('Total for this Order:'); ?>&nbsp;</b>
                      </td>
                      <td>
                        <b><?php print $order_total; ?></b>
                      </td>
                    </tr>

                    <tr>
                      <td colspan="2">
                        <br /><br /><b><?php print t('Products on order:'); ?>&nbsp;</b>

                        <table width="100%" style="font-family: verdana, arial, helvetica; font-size: small;">

                          <?php foreach ($products as $product): ?>
                          <tr>
                            <td valign="top" nowrap="nowrap">
                              <b><?php print $product->qty; ?> x </b>
                            </td>
                            <td width="98%">
                              <b><?php print $product->title; ?> - <?php print $product->total_price; ?></b>
                              <?php print $product->individual_price; ?><br />
                              <?php print t('SKU'); ?>: <?php print $product->model; ?><br />
                              <?php print $product->details; ?>
                            </td>
                          </tr>
                          <?php endforeach; ?>
                        </table>

                      </td>
                    </tr>
                  </table>

                </td>
              </tr>

              <?php if ($help_text || $email_text || $store_footer): ?>
              <tr>
                <td colspan="2">
                  <hr noshade="noshade" size="1" /><br />

                  <?php if ($help_text): ?>
                  <p><b><?php print t('Where can I get help with reviewing my order?'); ?></b><br />
                  <?php print t('To learn more about managing your orders on !store_link, please visit our <a href="!store_help_url">help page</a>.', array('!store_link' => $store_link, '!store_help_url' => $store_help_url)); ?>
                  <br /></p>
                  <?php endif; ?>

                  <?php if ($email_text): ?>
                  <p><?php print t('Please note: This e-mail message is an automated notification. Please do not reply to this message.'); ?></p>

                  <p><?php print t('Thanks again for shopping with us.'); ?></p>
                  <?php endif; ?>

                  <?php if ($store_footer): ?>
                  <p><b><?php print $store_link; ?></b><br /><b><?php print $site_slogan; ?></b></p>
                  <?php endif; ?>
                </td>
              </tr>
              <?php endif; ?>

            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<?php
$totalprice =  $product->total_price;
$total = str_replace( '$', '', $totalprice );  // deformats the number to non-currency
echo $total;
?>
<!-- Added PayPal Custom Button-->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="xxx@xxxd.out">
<input type="hidden" name="item_name" value="Item Name">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="amount" value="<?php echo $total; ?>">
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
<!-- End PayPal Custom Button-->

Last edited by madnhain; 07-29-2012 at 10:35 PM..
madnhain is offline
Reply With Quote
View Public Profile
 
Old 07-29-2012, 10:34 PM Re: Custom Payment / Invoice email?
madnhain's Avatar
Skilled Talker

Posts: 63
Name: Jez
Location: Grand Junction, CO / Williston, ND
Trades: 0
it should be noted, I suppose, that all of the code herein is functional and "default" virgin code unmolested by my wretched fingers with with the exception of the php code and paypal button at the very bottom.
madnhain is offline
Reply With Quote
View Public Profile
 
Old 07-30-2012, 05:00 PM Re: Custom Payment / Invoice email?
chrishirst's Avatar
Defies a Status

Posts: 43,963
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Weeeeelllll I don't supposed for one minute it could be anything at all to do with this

HTML Code:
<input type="hidden" uc-price"="" value="<span class=" name="amount">
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-30-2012, 11:13 PM Re: Custom Payment / Invoice email?
madnhain's Avatar
Skilled Talker

Posts: 63
Name: Jez
Location: Grand Junction, CO / Williston, ND
Trades: 0
Gee ya think? Lol

Obviously that's the issue... But why is it rendering that extra HTML there?

I don't see why it would put the span class stuff in there...
Or how to fix it.
madnhain is offline
Reply With Quote
View Public Profile
 
Old 07-31-2012, 07:50 AM Re: Custom Payment / Invoice email?
chrishirst's Avatar
Defies a Status

Posts: 43,963
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
No idea, but it must be in the code that creates the form.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-31-2012, 06:08 PM Re: Custom Payment / Invoice email?
madnhain's Avatar
Skilled Talker

Posts: 63
Name: Jez
Location: Grand Junction, CO / Williston, ND
Trades: 0
No idea? Do you maybe have a hunch as to why a php variable might do something like that? it makes absolutely no sense to me what so ever. I've never seen a php variable make a form do funky stuff like that before.... **shrug**
madnhain is offline
Reply With Quote
View Public Profile
 
Old 07-31-2012, 07:04 PM Re: Custom Payment / Invoice email?
chrishirst's Avatar
Defies a Status

Posts: 43,963
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Do you maybe have a hunch as to why a php variable might do something like that?
Only if that is what is in the value that the variable is set with.


By the way,

The PHP code you posted is NOT the code that creates the form code you posted.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-01-2012, 12:07 AM Re: Custom Payment / Invoice email?
madnhain's Avatar
Skilled Talker

Posts: 63
Name: Jez
Location: Grand Junction, CO / Williston, ND
Trades: 0
Sorry, I guess I'm not following... The Drupal site calls the code I posted and enters into that template the information provided by the order, producing a dynamic invoice, populated with the information from the order. I'm not sure what you are referring to by "code that creates the form code" the PayPal button form was inserted by myself at the end of the original template code

Last edited by madnhain; 08-01-2012 at 12:11 AM..
madnhain is offline
Reply With Quote
View Public Profile
 
Old 08-01-2012, 09:51 AM Re: Custom Payment / Invoice email?
chrishirst's Avatar
Defies a Status

Posts: 43,963
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
PHP Code:
<!-- Added PayPal Custom Button-->
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="xxx@xxxd.out">
<input type="hidden" name="item_name" value="Item Name">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="amount" value="<?php echo $total?>">
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
<!-- End PayPal Custom Button-->
HTML Code:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" value="_xclick" name="cmd">
<input type="hidden" value="xxx@xxxd.out" name="business">
<input type="hidden" value="Item Name" name="item_name">
<input type="hidden" value="USD" name="currency_code">
<input type="hidden" uc-price"="" value="<span class=" name="amount">
780.00"&gt; 
<input type="image" alt="Make payments with PayPal - it's fast, free and secure!" name="submit" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif">
</form>
This bit
HTML Code:
<input type="hidden" uc-price"="" value="<span class=" name="amount">
780.00"&gt;
Is in the form but NOT in the PHP code.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-01-2012, 02:56 PM Re: Custom Payment / Invoice email?
madnhain's Avatar
Skilled Talker

Posts: 63
Name: Jez
Location: Grand Junction, CO / Williston, ND
Trades: 0
Right.... *face palm*
Ok, so I've been playing around... I decided that perhaps this $total is a string, but when I try to pull the "total amount" and convert it to an integer... I always get 0. (int) doesn't do it, intval() echos back 0 as well. (float) no luck there.

when I do a var_dump($total)
I get:
string(36) "350.00"

I don't get it... What am I missing here?


When I just create a random $var with the value of 350, and run that through the paypal form, everything works beautifully....

So... it would seem there is something happening with that variable that is beyond my comprehension to decipher.
madnhain is offline
Reply With Quote
View Public Profile
 
Old 08-01-2012, 03:06 PM Re: Custom Payment / Invoice email?
chrishirst's Avatar
Defies a Status

Posts: 43,963
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You do not actually need it to be a number. form data is transmitted as character strings in any case.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Custom Payment / Invoice email?

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.70976 seconds with 11 queries