x
 
Create New Page
 View Previous Changes    ( Last updated by Guy Schalnat )

Simple Commerce warning email template variable

I was editing mod.simple_commerce.php anyway, so I added a {warning} variable for the email templates.

Part of the problem was the cost check line.  My version checks how much paypal received for the item versus the current price.  If the price was less then 90% of the total price, it through out the reply and didn’t add it into the database or send any emails.  Besides that being unacceptable to me, I thought it would be nice for the admin email template to be able to put a big fat warning in that if they detected such tampering.  It would rarely happen, but if an payment was going on when you changed the price from 8.99 to 9.99, or removed a 25% off sale, then that transaction is valid.  So I commented out the return and instead did this:

$warning '';

        if ( ... )
            
$warning $warning "Warning: Price may be invalid. ";

        
$this->post['warning'$warning

Note that you can stick all kinds of warnings in there if you want, but this is probably the only one that makes sense to most of you.

Category:Commerce -> PayPal Category:Hacks

Category:EE1

Categories: