Note that there are some explanatory texts on larger screens.

plurals
  1. POYii and Payfast
    primarykey
    data
    text
    <p>I'm trying to integrate the Payfast (www.payfast.co.za) with the Yii php framework. Payments are working fine and I get the ITN callback but my database queries have absolutely no effect. I was wondering if it is perhaps some sort of restriction on the Yii famework etc. prohibiting a db query. Does anybody have any insight on this issue?</p> <p>FYI, the request always redirects to payment success page but no database update. I have used the exact same logic with Codeigniter before with success, thus leading me to believe it might be a Yii issue.</p> <p>The code responsible for doing the db query is as follows:</p> <pre><code>// If the transaction was valid if( strcmp( $result, 'VALID' ) == 0 ) { // Process as required switch( $pfData['payment_status'] ) { case 'COMPLETE': // If complete, update your application, email the buyer and process the transaction as paid Order::model()-&gt;updateAll(array('paid'=&gt;1),'reference="'.$pfData['m_payment_id'].'"'); break; case 'FAILED': // There was an error, update your application and contact a member of PayFast's support team for further assistance break; case 'PENDING': // The transaction is pending, please contact a member of PayFast's support team for further assistance break; default: // If unknown status, do nothing (safest course of action) break; } } </code></pre> <p>The problem is that the switch doesn't seem to work? If you'd like to see the full code please see here:<a href="https://www.payfast.co.za/developers/php" rel="nofollow">https://www.payfast.co.za/developers/php</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload