Re: Payment_Process and Linkpoint

From: Date: Thu, 11 Aug 2005 00:05:26 +0000
Subject: Re: Payment_Process and Linkpoint
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20363@lists.php.net to get a copy of this message
I wrote the LinkPoint driver a *LOOONNNG* time ago (a year maybe?) and don't have access to LinkPoint anymore. I still have nightmares about their interface (it barfed if you did crazy things like add <?xml version="1.0"?> to it's XML request - XML gateway may arse). Where exactly did you get the error on validating the action? (ie. what function did you call that returned that?) Also, if you're interesting in cleaning up that driver and submitting it back I'll patch it an release a new version of PP (we plan on splitting drivers into their own packages as well). --Joe On Aug 10, 2005, at 4:54 PM, Blaine Lang wrote:
I am using the Linkpoint Process (beta) with the Payment_Process class and am hoping one of the project team members or list members can assist. Documentation is lean but I really want to use this class for a project as it looks very good now I just need to get it all figured out :) I've been tracing the execution thru the script and have resolved a number of local issues but am now a bit stumped. Using the example script "creditcard.php" and modifying to use the Linkpoint Processor. I am now getting a error => Validation of field "action" failed. It is coming from the Payment_Process_Common class - the function _validateAction. In linkpoint.php - we have this code in the process function:
        // Sanity check
        $result = $this->validate();
        if (PEAR::isError($result)) {
            return $result;
        }
       // Prepare the data
        $result = $this->_prepare();
        if (PEAR::isError($result)) {
            return $result;
        }
--- Debug trace output from the _validateAction --- Function:_validateLogin Function:_validatePassword Function:_validateAction Driver:Linkpoint Action:201 --- Function code showing my added debug lines ----
    function _validateAction()
    {
echo "<br>Driver:" . $this->_driver; echo "<br>Action:" . $this->action; echo "<br>";
        return (isset($GLOBALS['_Payment_Process_'.$this->_driver][$this->action]));
    }
Note: a few more lines of setup code in creditcard.php if (!PEAR::isError($process)) {
      $process->_debug = true;
      $process->login = 1499999151;   // Not my real login/password
      $process->password = '000000';
      $process->action = PAYMENT_PROCESS_ACTION_AUTHONLY;
      $process->amount = 1.00;
      $card = & Payment_Process_Type::factory('CreditCard');
      if (!PEAR::isError($card)) {
          $card->type = PAYMENT_PROCESS_CC_VISA;
          $card->invoiceNumber = 112345145;
          $card->customerId = 1499999151;
          $card->cardNumber = '4111111111111111';
          $card->expDate = '01/2006';
          $card->zip = '48197';
          $card->cvv = '768';
Any ideas ? Thanks in advance.
-- Joseph C. Stump joe@joestump.net http://www.joestump.net

« previous php.pear.general (#20363) next »