Beispiel #1
0
 function testMetadata()
 {
     /* token should be created via javascipt library beautiful.js */
     /* more info here: https://docs.start.payfort.com/guides/beautiful.js/ */
     $token = TestHelper::createtoken($this->cardForSuccess);
     $data = array("amount" => 1050, "currency" => "usd", "email" => "*****@*****.**", "card" => $token["id"], "description" => "Charge for test@example.com", "metadata" => array("reference_id" => "1234567890", "tag" => "new"));
     $result = Start_Charge::create($data);
     $this->assertEquals($result["metadata"], array("reference_id" => "1234567890", "tag" => "new"));
 }