Incorporate TripleA parameters

This commit is contained in:
Enrique Barcelli 2021-07-12 20:44:25 +08:00
parent 39f8a9e457
commit b336825326
2 changed files with 8 additions and 4 deletions

View file

@ -9,7 +9,7 @@ Smart Accounts ( http://www.smt-acc.com )
Smart Accounts ( http://www.smt-acc.com ) Smart Accounts ( http://www.smt-acc.com )
## More details ## More details
This version of the code is work-in-progress and should not be use in any production site.
## License ## License
GNU/GPL v2 ( http://www.gnu.org/licenses/gpl-2.0.html ) GNU/GPL v2 ( http://www.gnu.org/licenses/gpl-2.0.html )

View file

@ -5,8 +5,8 @@ class plgHikashoppaymentTriplea extends hikashopPaymentPlugin{
var $accepted_currencies = array( var $accepted_currencies = array(
'AUD','CAD','EUR','GBP','JPY','USD','NZD','CHF','SGD', 'AUD','CAD','EUR','GBP','JPY','USD','NZD','CHF','SGD',
'DKK','PLN','NOK','CZK','MXN','MYR','PHP','TWD','ILS', 'NOK','MYR','PHP','TWD',
'RUB','CNY','NGN' 'HKD','IDR','KRW','SEK','THB','VND'
); );
var $debugData = array(); var $debugData = array();
var $multiple = true; var $multiple = true;
@ -14,6 +14,9 @@ class plgHikashoppaymentTriplea extends hikashopPaymentPlugin{
var $pluginConfig = array( var $pluginConfig = array(
'url' => array('URL', 'input'), 'url' => array('URL', 'input'),
'walletid' => array('TripleA Wallet ID', 'input'), 'walletid' => array('TripleA Wallet ID', 'input'),
'merchant_key'=>array('TripleA Merchant Key', 'input'),
'client_id'=>array('TripleA Client ID','input'),
'notify_secret'=>array('TripleA Client secret','input'),
'invalid_status' => array('INVALID_STATUS', 'orderstatus'), 'invalid_status' => array('INVALID_STATUS', 'orderstatus'),
'pending_status' => array('PENDING_STATUS', 'orderstatus'), 'pending_status' => array('PENDING_STATUS', 'orderstatus'),
'verified_status' => array('VERIFIED_STATUS', 'orderstatus') 'verified_status' => array('VERIFIED_STATUS', 'orderstatus')
@ -27,8 +30,9 @@ class plgHikashoppaymentTriplea extends hikashopPaymentPlugin{
$cancel_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=order&task=cancel_order&order_id='.$order->order_id.$this->url_itemid; $cancel_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=order&task=cancel_order&order_id='.$order->order_id.$this->url_itemid;
$vars = array( $vars = array(
"type" => 'triplea',
"ok_receiver" => $this->payment_params->walletid, "ok_receiver" => $this->payment_params->walletid,
"ok_currency" => $this->currency->currency_code, "order_currency" => $this->currency->currency_code,
"invoice" => $order->order_id, "invoice" => $order->order_id,
"ok_return_success" => $return_url, "ok_return_success" => $return_url,
"ok_ipn" => $notify_url, "ok_ipn" => $notify_url,