CRM-16367 (Payment): Added payment_token_id + FK to recurring contributions table.
authorRob Thorne <rob@torenware.com>
Wed, 29 Apr 2015 20:47:30 +0000 (20:47 +0000)
committerRob Thorne <rob@torenware.com>
Thu, 30 Apr 2015 03:02:01 +0000 (03:02 +0000)
tests/phpunit/api/v3/PaymentTokenTest.php
xml/schema/Contribute/ContributionRecur.xml

index 11e7ee5c747febca7151396475b7220c19c1f406..e480a49f1f26a067de37e6a086c81e769cce8f88 100644 (file)
@@ -58,9 +58,7 @@ class api_v3_PaymentTokenTest extends CiviUnitTestCase {
     $result = $this->callAPIAndDocument('payment_token', 'create', $this->params, __FUNCTION__, __FILE__, $description);
     $this->assertEquals(1, $result['count']);
     $this->assertNotNull($result['values'][$result['id']]['id']);
-    $this->getAndCheck(array_merge($this->params, array( //your parameters here.
-                                                        $this->params
-                                                        )), $result['id'], 'payment_token', TRUE);
+    $this->getAndCheck(array_merge($this->params, array($this->params,)), $result['id'], 'payment_token', TRUE);
   }
 
   public function testGetPaymentToken() {
@@ -81,4 +79,3 @@ class api_v3_PaymentTokenTest extends CiviUnitTestCase {
   }
 
 }
-
index 65fec6ff6784fcf29e7fb4d7c41e0a64d0f350f7..1024fe0a5cdfab0050e0deb9b53b21ba9c0b2004 100644 (file)
     <comment>Possibly needed to store a unique identifier for this recurring payment order - if this is available from the processor??</comment>
     <add>1.6</add>
   </field>
+  <field>
+    <name>payment_token_id</name>
+    <title>Payment Token ID</title>
+    <type>int unsigned</type>
+    <comment>Optionally used to store a link to a payment token used for this recurring contribution.</comment>
+    <add>4.6</add>
+  </field>
+  <foreignKey>
+    <name>payment_token_id</name>
+    <table>civicrm_payment_token</table>
+    <key>id</key>
+    <add>4.6</add>
+    <onDelete>SET NULL</onDelete>
+  </foreignKey>
   <field>
     <name>trxn_id</name>
     <title>Transaction ID</title>