[TYPO3-paymentlib] Donations - no donation record is inserted

Brian Bendtsen nightowl at galnet.dk
Mon Jun 11 16:17:36 CEST 2007


Tonni Aagesen skrev:
> Brian Bendtsen wrote:
> 
>> Step 4 gives me a bit of a headache, im not sure where to insert the 
>> update code.
>>
>> I have my userform, where user selects paymentmethod, then a 
>> confirmation page with the form action set to quickpay gateway address.
>>
>> After this its bit of a blur.
>>
>> When the user has paid is my extension called again with some parameters?
>>
>> In testing it looks like the user is just sent to the ok page, which 
>> is only a normal page with normal page content.
> 
> When you store the record data, you should get the record uid and put it 
> in a session. Then go on to the payment, and store the unique 
> identification (ordernumber, you can eg. the record uid) in a session as 
> well.
> 
> The in flow should be:
> 
> 1. Store record uid in session upon inserting record to database
> 2. Initialize a payment and check that the payment isn't already finished.
> 3. commit payment and update your record data (here is when you use the 
> record uid).
> 
> There is small illustration of the flow in:
> http://t3dd07.typo3.org/fileadmin/slides/introduction_to_paymentlib.pdf
> 
> 

Im so close, but Im having a little trouble with the "Check if already 
committed succesfully" part. Even though a transaction has been made and 
a record inserted in the database my ext. cant "see" the succesfull 
transaction and goes on with "Set transaction details" again:

and displays:

ERROR: Setting details of transaction failed.

The code that should redirect to my receed function:

$transactionResultsArr = 
$providerObj->transaction_getResults($paymentReference);
		if (is_array ($transactionResultsArr)) {
             if ($transactionResultsArr['state'] == 500) {
                 header ('Location: 
'.t3lib_div::getIndpEnv('TYPO3_SITE_URL').$this->pi_getPageLink($GLOBALS['TSFE']->id, 
'', array('tx_indmeldelse_pi1[receed]' => 'receed')));
                 exit;
             } else {
                 $message = 'Payment declined';
             }
         }

The transaction with the correct paymentReference and the state = 500 is 
present in the database, so why am I not redirected?

/BB




More information about the TYPO3-project-paymentlib mailing list