Skip to content

Commit

Permalink
Issue #40 fix: pass name, address, city etc while placing the order s…
Browse files Browse the repository at this point in the history
…o that the order details are shown prefilled on the 2checkout (#41)

* Issue #40 fix: pass name, address, city etc while placing the order so that the order details are shown prefilled on the 2checkout

* Issue #40 fix: pass name, address, city etc while placing the order so that the order details are shown prefilled on the 2checkout

* Issue #40 fix: pass name, address, city etc while placing the order so that the order details are shown prefilled on the 2checkout

* Issue #40 fix: pass name, address, city etc while placing the order so that the order details are shown prefilled on the 2checkout
  • Loading branch information
ankush-maherwal authored and manojLondhe committed Jun 29, 2018
1 parent dbb92e3 commit 8a0191b
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 21 deletions.
8 changes: 6 additions & 2 deletions code/plugins/2checkout/2checkout.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?php
/**
* @copyright Copyright (c) 2009-2015 TechJoomla. All rights reserved
* @license GNU General Public License version 2, or later
* @package Joomla_Payments
* @subpackage plg_payments_2checkout
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// No direct access
Expand Down
8 changes: 6 additions & 2 deletions code/plugins/2checkout/2checkout/helper.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?php
/**
* @copyright Copyright (c) 2009-2013 TechJoomla. All rights reserved.
* @license GNU General Public License version 2, or later
* @package Joomla_Payments
* @subpackage plg_payments_2checkout
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die(';)');
Expand Down
26 changes: 19 additions & 7 deletions code/plugins/2checkout/2checkout/tmpl/default.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<?php
/**
* @copyright Copyright (c) 2009-2015 TechJoomla. All rights reserved
* @license GNU General Public License version 2, or later
* @package Joomla_Payments
* @subpackage plg_payments_2checkout
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die('Restricted access');
?>

Expand All @@ -11,15 +16,22 @@
<div>
<input type="hidden" name="sid" value="<?php echo $vars->sid?>" />
<input type="hidden" name="cart_order_id" value="<?php echo $vars->order_id ?>" />
<input type="hidden" name="total" value="<?php echo sprintf('%02.2f',$vars->amount) ?>" />

<input type="hidden" name="total" value="<?php echo sprintf('%02.2f', $vars->amount) ?>" />
<input type="hidden" name="demo" value="<?php echo $vars->demo; ?>" />
<input type="hidden" name="merchant_order_id" value="<?php echo $vars->order_id ?>" />
<input type="hidden" name="merchant_order_id" value="<?php echo $vars->order_id ?>" />
<input type="hidden" name="fixed" value="Y" />
<input type="hidden" name="lang" value="<?php echo $vars->lang; ?>" />
<input type='hidden' name='return_url' value="<?php echo $vars->return;?>" >
<input type='hidden' name='x_receipt_link_url' value="<?php echo $vars->notify_url;?>" >
<input type='hidden' name='x_receipt_link_url' value="<?php echo $vars->return;?>" />
<input type="hidden" name="pay_method" value="<?php echo strtoupper($vars->pay_method); ?>" />
<input type="hidden" name="card_holder_name" value="<?php echo $vars->user_firstname . " " . $vars->user_lastname?>" />
<input type="hidden" name="email" value="<?php echo $vars->user_email?>" />
<input type="hidden" name="street_address" value="<?php echo $vars->address?>" />
<input type="hidden" name="street_address2" value="<?php echo $vars->address2?>" />
<input type="hidden" name="zip" value="<?php echo $vars->zipcode?>" />
<input type="hidden" name="phone" value="<?php echo $vars->contactNumber?>" />
<input type="hidden" name="city" value="<?php echo $vars->cityName?>" />
<input type="hidden" name="state" value="<?php echo $vars->stateName?>" />
<input type="hidden" name="country" value="<?php echo $vars->countryName?>" />
<input type="hidden" name="id_type" value="1" />
<div class="form-actions">
<input name='submit' type='submit' class="btn btn-success btn-large" value="<?php echo JText::_('SUBMIT'); ?>" >
Expand Down
29 changes: 19 additions & 10 deletions code/plugins/2checkout/2checkout/tmpl/form.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
<?php
/**
* @copyright Copyright (c) 2009-2015 TechJoomla. All rights reserved
* @license GNU General Public License version 2, or later
* @package Joomla_Payments
* @subpackage plg_payments_2checkout
*
* @author Techjoomla <[email protected]>
* @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die('Restricted access');

?>
?>
<div class="tjcpg-wrapper">
<form action="<?php echo $vars->action_url ?>" class="form-horizontal" method="post" id="paymentForm">

<input type="hidden" name="sid" value="<?php echo $vars->sid?>" />
<input type="hidden" name="cart_order_id" value="<?php echo $vars->order_id ?>" />
<input type="hidden" name="total" value="<?php echo sprintf('%02.2f',$vars->amount) ?>" />

<input type="hidden" name="total" value="<?php echo sprintf('%02.2f', $vars->amount) ?>" />
<input type="hidden" name="demo" value="<?php echo $vars->demo; ?>" />
<input type="hidden" name="merchant_order_id" value="<?php echo $vars->order_id ?>" />
<input type="hidden" name="merchant_order_id" value="<?php echo $vars->order_id ?>" />
<input type="hidden" name="fixed" value="Y" />
<input type="hidden" name="lang" value="<?php echo $vars->lang; ?>" />
<input type='hidden' name='return_url' value="<?php echo $vars->return;?>" >
<input type='hidden' name='x_receipt_link_url' value="<?php echo $vars->notify_url;?>" >
<input type='hidden' name='x_receipt_link_url' value="<?php echo $vars->return;?>" >
<input type="hidden" name="pay_method" value="<?php echo strtoupper($vars->pay_method); ?>" />
<input type="hidden" name="card_holder_name" value="<?php echo $vars->user_firstname . " " . $vars->user_lastname?>" />
<input type="hidden" name="email" value="<?php echo $vars->user_email?>" />
<input type="hidden" name="street_address" value="<?php echo $vars->address?>" />
<input type="hidden" name="street_address2" value="<?php echo $vars->address2?>" />
<input type="hidden" name="zip" value="<?php echo $vars->zipcode?>" />
<input type="hidden" name="phone" value="<?php echo $vars->contactNumber?>" />
<input type="hidden" name="city" value="<?php echo $vars->cityName?>" />
<input type="hidden" name="state" value="<?php echo $vars->stateName?>" />
<input type="hidden" name="country" value="<?php echo $vars->countryName?>" />
<input type="hidden" name="id_type" value="1" />
<div class="form-actions">
<input name="submit" type="submit" class="btn btn-success btn-large" value="Pay Now" >
Expand Down

0 comments on commit 8a0191b

Please sign in to comment.