Skip to content

Commit

Permalink
fill owner form with buyer.billingAddress values
Browse files Browse the repository at this point in the history
  • Loading branch information
PaylineGitHub committed Apr 26, 2017
1 parent 4dcf4c8 commit f24f789
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions examples/fieldset/owner.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@
<h4>Informations about owner (only used by an AMEX payment)</h4>
<div class="row">
<label for="ownerLastName">Last name</label>
<input type="text" name="ownerLastName" id="ownerLastName" value="" />
<input type="text" name="ownerLastName" id="ownerLastName" value="<?php echo $_SESSION['buyerLastName'] ?>" />
</div>
<div class="row">
<label for="ownerFirstName">First name</label>
<input type="text" name="ownerFirstName" id="ownerFirstName" value="" />
<input type="text" name="ownerFirstName" id="ownerFirstName" value="<?php echo $_SESSION['buyerFirstName'] ?>" />
</div>
<div class="row">
<label for="issueCardDate">Card issue date</label>
<input type="text" name="issueCardDate" id="issueCardDate" value="" />
<input type="text" name="issueCardDate" id="issueCardDate" value="01<?php echo date('y')-1?>" />
</div>
<div class="row">
<h5>Owner billing address</h5>
</div>
<div class="row">
<label for="ownerStreet">Street</label>
<input type="text" name="ownerStreet" id="ownerStreet" value="" />
<input type="text" name="ownerStreet" id="ownerStreet" value="<?php echo $_SESSION['billingAddressStreet1'] ?>" />
</div>
<div class="row">
<label for="ownerCityName">City name</label>
<input type="text" name="ownerCityName" id="ownerCityName" value="" />
<input type="text" name="ownerCityName" id="ownerCityName" value="<?php echo $_SESSION['billingAddressCity'] ?>" />
</div>
<div class="row">
<label for="ownerZipCode">Zip code</label>
<input type="text" name="ownerZipCode" id="ownerZipCode" value="" />
<input type="text" name="ownerZipCode" id="ownerZipCode" value="<?php echo $_SESSION['billingAddressZipCode'] ?>" />
</div>
<div class="row">
<label for="ownerCountry">Country</label>
<input type="text" name="ownerCountry" id="ownerCountry" value="" />
<input type="text" name="ownerCountry" id="ownerCountry" value="<?php echo $_SESSION['billingAddressCountry'] ?>" />
</div>
<div class="row">
<label for="ownerPhone">Phone</label>
<input type="text" name="ownerPhone" id="ownerPhone" value="" />
<input type="text" name="ownerPhone" id="ownerPhone" value="<?php echo $_SESSION['billingAddressPhone'] ?>" />
</div>
</fieldset>
1 change: 1 addition & 0 deletions examples/index/configuration.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
use Monolog\Logger;
$displayedPage = 'configuration';
?>
<form action="../index/updateConfig.php" method="post" class="payline-form">
<input type="hidden" name="configForm" value="1">
Expand Down
4 changes: 2 additions & 2 deletions lib/lib_debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ function _remove_exessive_leading_tabs( $string ) {
}

function insertTransactionData($contractNumber,$orderRef,$transactionId,$paymentAction,$amount,$currency,$resultCode,$token=null){
if(defined(DB_HOST)){
if(defined('DB_HOST')){
$link = mysql_connect(DB_HOST, DB_OWNER, DB_PASS);
if(!$link){
return false;
Expand All @@ -575,7 +575,7 @@ function insertTransactionData($contractNumber,$orderRef,$transactionId,$payment
}else{
$transactionsFile = '../index/transactions.dat';
$handle = fopen($transactionsFile, 'a+');
fwrite($handle, 'ENVIRONMENT='.$_SESSION['ENVIRONMENT'].'#'.'MERCHANT_ID='.$_SESSION['MERCHANT_ID']."#CONTRACT=$contractNumber#ORDER_REF=$orderRef#TRANSACTION_ID=$transactionId#ACTION=$paymentAction#TOKEN=$token#AMOUNT=$amount#CURRENCY=$currency#DATE=".time()."#RESULT=$resultCode#\n");
fwrite($handle, 'ENVIRONMENT='.$_SESSION['ENVIRONMENT'].'#'.'MERCHANT_ID='.$_SESSION['MERCHANT_ID']."#CONTRACT=$contractNumber#ORDER_REF=$orderRef#TRANSACTION_ID=$transactionId#ACTION=$paymentAction#TOKEN=$token#AMOUNT=$amount#CURRENCY=$currency#DATE=".time()."#RESULT=$resultCode\n");
fclose($handle);
return 1;
}
Expand Down

0 comments on commit f24f789

Please sign in to comment.