File tree Expand file tree Collapse file tree
example/src/main/java/com/pingxx/example Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ public static void runDemos(String appId) {
4747 chargeExample .retrieve (charge .getId ());
4848 System .out .println ("------- 查询 charge 列表 -------" );
4949 chargeExample .list ();
50+ System .out .println ("------- 撤销 charge(仅支持线下渠道) -------" );
51+ chargeExample .reverse (charge .getId ());
5052 }
5153
5254 /**
@@ -104,7 +106,6 @@ public Charge createCharge() {
104106 * 该接口根据 charge Id 查询对应的 charge 。
105107 * 参考文档:https://www.pingxx.com/api#api-c-inquiry
106108 *
107- * 该接口可以传递一个 expand , 返回的 charge 中的 app 会变成 app 对象。
108109 * 参考文档: https://www.pingxx.com/api#api-expanding
109110 * @param id
110111 */
@@ -121,6 +122,24 @@ public Charge retrieve(String id) {
121122 return charge ;
122123 }
123124
125+ /**
126+ * 撤销 Charge
127+ *
128+ * @param id
129+ */
130+ public Charge reverse (String id ) {
131+ Charge charge = null ;
132+ try {
133+ Map <String , Object > params = new HashMap <String , Object >();
134+ charge = Charge .reverse (id );
135+ System .out .println (charge );
136+ } catch (PingppException e ) {
137+ e .printStackTrace ();
138+ }
139+
140+ return charge ;
141+ }
142+
124143 /**
125144 * 分页查询 Charge
126145 *
You can’t perform that action at this time.
0 commit comments