public static function getTransactionAuthenticationValue() { $json = "{\n" . "\t\"cardToken\": \"dT2bT-P5dvK0-3zCi9VByf_SUsXxLEmITJGLsWm_oYE\",\n" . "\t\"mctTransAuthId\": \"0f2e781e-1d38-4766-a635-8d906d3fdff7\",\n" . "\t\"ocTransAuthId\": \"TA20151130000000000020008\",\n" . "\t\"paymentAuthenticationDetail\": {\n" . "\t\t\"payMethod\": \"10\",\n" . "\t\t\"payAmount\": 1000,\n" . "\t\t\"offerAmount\": 0,\n" . "\t\t\"loyaltyAmount\": 0,\n" . "\t\t\"payInstallment\": \"00\",\n" . "\t\t\"payCurrency\": \"KRW\",\n" . "\t\t\"payFinanceCode\": \"17\",\n" . "\t\t\"isCardPointApplied\": false\n" . "\t}\n" . "}"; $j = json_decode($json); $t = SyrupPayTokenBuilder::fromJson(new TransactionAuthenticationValue(), $j); return $t; }
public function test_유효시간_마이너스_1분으로_입력_후_만료여부_검증() { $builder = new SyrupPayTokenBuilder(); $builder->of("test"); $builder->expiredMinutes(-1); $json = $builder->toJson(); $token = SyrupPayTokenBuilder::fromJson(new SyrupPayToken(), json_decode($json)); $this->assertNotNull($token); $this->assertEquals(false, $token->isValidInTime()); }