Paypal PDN Integration No shipping address for Credit Card Payment
Posted on | November 28, 2009 | No Comments
Default delivery address for Paypal Transactions is the Billing Address(which has to be the credit card holder’s address to prevent triggering fraud checks). Paypal allows user to specify another address when confirming the purchase. The website has already captured a shipping address on the checkout pages. The addresses captured and reflected in paypal’s system and notification email could be different from the ones captured by the website. To prevent the user from overriding the shipping address captured in paypal. Add in no_shipping = 1.
<input type=”hidden” name=”cmd” value=”_cart” />
<input type=”hidden” name=”no_shipping” value=”1″ />
<input type=”hidden” name=”upload” value=”1″ />
<input type=”hidden” name=”business” value=”<?php echo Configure::read(‘paypal.paypal_biz’) ?>” />
<input type=”hidden” name=”return” value=”http://<?php echo DOMAIN.$html->url(‘/payments/completed/’.$order_id)?>” />
Max no of characters, max no of words
Posted on | June 9, 2009 | No Comments
Remember if you still remember those school days, when you have to write compositions, you need to mark out exactly 350 words. The purpose is for the marker to know where he or she can stop reading.
PHP functions that does word count
str_word_count()
And on the str_word_count() manual page, these is this helpful function for UTF8 word count
define("WORD_COUNT_MASK", "/\p{L}[\p{L}\p{Mn}\p{Pd}'\x{2019}]*/u");
function str_word_count_utf8($string, $format = 0)
{
switch ($format) {
case 1:
preg_match_all(WORD_COUNT_MASK, $string, $matches);
return $matches[0];
case 2:
preg_match_all(WORD_COUNT_MASK, $string, $matches, PREG_OFFSET_CAPTURE);
$result = array();
foreach ($matches[0] as $match) {
$result[$match[1]] = $match[0];
}
return $result;
}
return preg_match_all(WORD_COUNT_MASK, $string, $matches);
}
Do rememebr to strip off all html tags first before you do the word count.




















