Skip to content

Commit

Permalink
Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into develop
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/commande/list.php
	htdocs/public/payment/newpayment.php
	htdocs/public/paypal/newpayment.php
  • Loading branch information
eldy committed May 29, 2018
2 parents 2ae9591 + b846f0f commit 57664c5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions htdocs/public/payment/newpayment.php
Expand Up @@ -269,6 +269,7 @@
$PAYPAL_API_PRICE=price2num(GETPOST("newamount",'alpha'),'MT');
$PAYPAL_PAYMENT_TYPE='Sale';

// Vars that are used as global var later in print_paypal_redirect()
$origfulltag=GETPOST("fulltag",'alpha');
$shipToName=GETPOST("shipToName",'alpha');
$shipToStreet=GETPOST("shipToStreet",'alpha');
Expand All @@ -282,18 +283,24 @@
$desc=GETPOST("desc",'alpha');
$thirdparty_id=GETPOST('thirdparty_id', 'int');

// Special case for Paypal-Indonesia
if ($shipToCountryCode == 'ID' && ! preg_match('/\-/', $shipToState))
{
$shipToState = 'ID-'.$shipToState;
}

$mesg='';
if (empty($PAYPAL_API_PRICE) || ! is_numeric($PAYPAL_API_PRICE))
{
$mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Amount"));
$action='';
$action = '';
}
//elseif (empty($EMAIL)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("YourEMail"));
//elseif (! isValidEMail($EMAIL)) $mesg=$langs->trans("ErrorBadEMail",$EMAIL);
elseif (! $origfulltag)
{
$mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentCode"));
$action='';
$action = '';
}

//var_dump($_POST);
Expand Down Expand Up @@ -1363,6 +1370,7 @@
$phoneNum=$member->phone;
if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip)
{
print '<!-- Shipping address information -->';
print '<input type="hidden" name="shipToName" value="'.$shipToName.'">'."\n";
print '<input type="hidden" name="shipToStreet" value="'.$shipToStreet.'">'."\n";
print '<input type="hidden" name="shipToCity" value="'.$shipToCity.'">'."\n";
Expand Down

0 comments on commit 57664c5

Please sign in to comment.