14 lines
780 B
Java
14 lines
780 B
Java
import com.alibaba.fastjson.JSON;
|
|
import java.util.Map;
|
|
|
|
public class TestCreateResponse {
|
|
public static void main(String[] args) {
|
|
String sampleResponse = "{\"resp_code\":\"00000000\",\"resp_desc\":\"成功\",\"pay_url\":\"https://qr.alipay.com/bax06073aogec1i3hnxm25ca\",\"hf_seq_id\":\"002900TOP1B260626063214P375ac139c1e00000\",\"party_order_id\":\"03212606262353456318391\",\"trans_amt\":\"0.01\",\"goods_desc\":\"测试商品\"}";
|
|
Map<String, Object> response = JSON.parseObject(sampleResponse, Map.class);
|
|
|
|
System.out.println("=== 汇付创建支付响应字段 ===");
|
|
for (Map.Entry<String, Object> entry : response.entrySet()) {
|
|
System.out.println(" " + entry.getKey() + ": " + entry.getValue());
|
|
}
|
|
}
|
|
} |