https://www.mediawiki.org/wiki/Special:Code/MediaWiki/102086

Revision: 102086
Author:   jpostlethwaite
Date:     2011-11-05 04:41:15 +0000 (Sat, 05 Nov 2011)
Log Message:
-----------
Added method: addKeyToTransaction(). This is a helper to modify the transaction 
INSERT_ORDERWITHPAYMENT.

Modified Paths:
--------------
    trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php

Modified: trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php
===================================================================
--- trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php       
2011-11-05 04:39:17 UTC (rev 102085)
+++ trunk/extensions/DonationInterface/gateway_common/gateway.adapter.php       
2011-11-05 04:41:15 UTC (rev 102086)
@@ -587,6 +587,18 @@
        }
 
        /**
+        * Add a key to the transaction INSERT_ORDERWITHPAYMENT.
+        *
+        * 
$this->transactions['INSERT_ORDERWITHPAYMENT']['request']['REQUEST']['PARAMS'][ 
$key ][] = $value 
+        */
+       protected function addKeyToTransaction( $value, $type = 'PAYMENT' ) {
+
+               if ( !in_array( $value, 
$this->transactions['INSERT_ORDERWITHPAYMENT']['request']['REQUEST']['PARAMS'][ 
$type ] ) ) {
+                       
$this->transactions['INSERT_ORDERWITHPAYMENT']['request']['REQUEST']['PARAMS'][ 
$type ][] = $value;
+               }
+       }
+       
+       /**
         * Builds a set of transaction data in name/value format
         *              *)The current transaction must be set before you call 
this function.
         *              *)Uses getTransactionSpecificValue to assign staged 
values to the 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to