SstartIndex less than zero

  • allthingsweb
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 9 months ago #22034 by allthingsweb
SstartIndex less than zero was created by allthingsweb
Hi,

I am running Joomdonation 2.9.1

I have had some donations fail on truecolours.org.nz and the error message is

startIndex less than zero. Paremter name: startIndex

The payment plugin is DPS

any help appreciated.

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #22045 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: SstartIndex less than zero
Hi allthingsweb

Are you using DPS payment plugin from our team or you developed it yourself ? I am asking this because in our DPS PX Pay payment plugin code, there is now startIndex parameter ? Could you please check and get back to me ?

Tuan

Please Log in or Create an account to join the conversation.

  • allthingsweb
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 9 months ago - 12 years 9 months ago #22080 by allthingsweb
Replied by allthingsweb on topic Re: startIndex less than zero
Thank you for your reply, we are using the DPS payment plugin developed and adapted by your team

Please see the attached file




(okay so i cant upload an attachment so her is the code)
Code:
<?php /** * @version 1.0 * @package Joomla * @subpackage Joom Donation * @author Tuan Pham Ngoc * @copyright Copyright (C) 2010 Ossolution Team * @license GNU/GPL, see LICENSE.php */ class os_dps extends os_payment { /** * DPS url * * @var string */ var $_url = null ; /** * User ID * * @var string */ var $_px_pay_user_id = null ; /** * PX Pay Key * * @var string */ var $_px_pay_key = null ; /** * Currency * * @var string */ var $_px_pay_currency = null ; /** * Constructor functions, init some parameter * * @param object $params */ function os_dps($params) { parent::setName('os_dps'); parent::os_payment() ; parent::setCreditCard(false); parent::setCardType(false); parent::setCardCvv(false); parent::setCardHolderName(false); $this->_url = 'https://sec.paymentexpress.com/pxpay/pxaccess.aspx'; $this->_px_pay_user_id = $params->get('px_pay_user_id'); $this->_px_pay_key = $params->get('px_pay_key'); $this->_px_pay_currency = $params->get('px_pay_currency'); } function getEnableRecurring() { return 0 ; } /** * Process payment via the payment gateway * * @param object $row * @param array $data * @return void */ function processPayment($row, $data) { $mainframe = & JFactory::getApplication(); $siteUrl = JURI::base() ; require_once JPATH_COMPONENT.'/payments/dps/dps.php'; $pxpay = new PxPay_Curl($this->_url, $this->_px_pay_user_id, $this->_px_pay_key); $request = new PxPayRequest() ; $request->setMerchantReference($row->id); $request->setAmountInput(round($data['gateway_amount'], 2)); $request->setTxnData1($row->address1); $request->setTxnData2($row->address2); $request->setTxnData3(''); $request->setTxnType('Purchase'); $request->setCurrencyInput($this->_px_pay_currency); $request->setEmailAddress($row->email); $request->setUrlFail($siteUrl.'jd_dps_return.php'); $request->setUrlSuccess($siteUrl.'jd_dps_return.php'); $request->setTxnId($row->transaction_id); $request_string = $pxpay->makeRequest($request); $response = new MifMessage($request_string); $url = $response->get_element_text("URI"); $mainframe->redirect($url); } /** * Validate payment * * @return string */ function _validate() { require_once JPATH_COMPONENT.'/payments/dps/dps.php'; $pxpay = new PxPay_Curl($this->_url, $this->_px_pay_user_id, $this->_px_pay_key); $enc_hex = $_REQUEST["result"]; $rsp = $pxpay->getResponse($enc_hex); $id = $rsp->getMerchantReference(); JRequest::setVar('id', $id) ; if ($rsp->getSuccess() == "1") { $ret = true ; JRequest::setVar('transaction_id', $rsp->getDpsTxnRef()) ; } else { $ret = false ; $_SESSION['reason'] = $rsp->getResponseText() ; } return $ret ; } /** * Verify payment of px pay * * @return boolean */ function verifyPayment() { $mainframe = & JFactory::getApplication() ; $Itemid = JRequest::getInt('Itemid'); $ret = $this->_validate(); if ($ret) { $config = JoomDonationHelper::getConfig() ; $id = JRequest::getInt('id'); $row = & JTable::getInstance('jdonation', 'Table'); $row->load($id); if (!$row->published) { $row->transaction_id = JRequest::getVar('transaction_id', '') ; $row->payment_date = date('Y-m-d H:i:s'); $row->published = true; $row->store(); JoomDonationHelper::sendEmails($row, $config); JPluginHelper::importPlugin( 'jdonation' ); $dispatcher =& JDispatcher::getInstance(); $dispatcher->trigger( 'onAfterPaymentSuccess', array($row)); } $mainframe->redirect('index.php?option=com_jdonation&view=complete&id='.$id.'&Itemid='.$Itemid); return true; } else { $mainframe->redirect('index.php?option=com_jdonation&view=failure&id='.$id.'&Itemid='.$Itemid); return false; } } }

regards

Chris
Last edit: 12 years 9 months ago by allthingsweb.

Please Log in or Create an account to join the conversation.

  • allthingsweb
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 9 months ago #22187 by allthingsweb
Replied by allthingsweb on topic Re: startIndex less than zero

I am asking this because in our DPS PX Pay payment plugin code, there is now startIndex parameter


Sorry I misunderstood, you typed "now" you mean "no" okay I understand.

However there is an error which may or may not be related but I have found that not all registrations are being recorded, this is very troubling as no contact information is available for people whio have purchased tickets.

I will search your forum for an answer before sending a support ticket.

Please Log in or Create an account to join the conversation.

Moderators: Dang Thuc DamDang Dam