/** * 取引登録を実行する * * @param EntryTranInput $input 入力パラメータ * @return EntryTranOutput $output 出力パラメータ * @exception GPayException */ function exec(&$input) { // 元の店舗名を退避 $tdTenantName = $input->getTdTenantName(); // 3Dセキュア店舗名をBASE64暗号化 $encrypt = new Cryptgram(); $encodeTdTenantName = $encrypt->encodeBase64($input->getTdTenantName()); if (!is_null($encodeTdTenantName) && strlen($encodeTdTenantName) > 25) { $this->exception = new GPayException("3Dセキュア店舗名のBASE64暗号化後の長さが25Byteを超えています。", $this->exception); return null; } // 暗号化文字列を再セット $input->setTdTenantName($encodeTdTenantName); // 接続しプロトコル呼び出し・結果取得 $resultMap = $this->callProtocol($input->toString()); // 店舗名を退避しておいた元の文字列に戻す $input->setTdTenantName($tdTenantName); // 戻り値がnullの場合、nullを戻す if (is_null($resultMap)) { return null; } // EntryTranOutput作成し、戻す return new EntryTranOutput($resultMap); }