File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 56
56
* * startMonth
57
57
* * startYear
58
58
* * cvv
59
+ * * tracks
59
60
* * issueNumber
60
61
* * billingTitle
61
62
* * billingName
@@ -544,6 +545,28 @@ public function setCvv($value)
544
545
return $ this ->setParameter ('cvv ' , $ value );
545
546
}
546
547
548
+ /**
549
+ * Get raw data for all tracks on the credit card magnetic strip.
550
+ *
551
+ * @return string
552
+ */
553
+ public function getTracks ()
554
+ {
555
+ return $ this ->getParameter ('tracks ' );
556
+ }
557
+
558
+ /**
559
+ * Sets raw data from all tracks on the credit card magnetic strip. Used by gateways that support card-present
560
+ * transactions.
561
+ *
562
+ * @param $value
563
+ * @return CreditCard
564
+ */
565
+ public function setTracks ($ value )
566
+ {
567
+ return $ this ->setParameter ('tracks ' , $ value );
568
+ }
569
+
547
570
/**
548
571
* Get the card issue number.
549
572
*
Original file line number Diff line number Diff line change @@ -309,6 +309,12 @@ public function testCvv()
309
309
$ this ->assertEquals ('456 ' , $ this ->card ->getCvv ());
310
310
}
311
311
312
+ public function testTracks ()
313
+ {
314
+ $ this ->card ->setTracks ('%25B4242424242424242%5ETESTLAST%2FTESTFIRST%5E1505201425400714000000%3F%3B4242424242424242%3D150520142547140130%3F ' );
315
+ $ this ->assertSame ('%25B4242424242424242%5ETESTLAST%2FTESTFIRST%5E1505201425400714000000%3F%3B4242424242424242%3D150520142547140130%3F ' , $ this ->card ->getTracks ());
316
+ }
317
+
312
318
public function testIssueNumber ()
313
319
{
314
320
$ this ->card ->setIssueNumber ('12 ' );
You can’t perform that action at this time.
0 commit comments