|
|
@@ -227,4 +227,26 @@ class AcceptorController extends webApp
|
|
|
return showJson(AcceptorService::make()->getError(),true, $result);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * C2C交易-购买星豆
|
|
|
+ * @param MemberValidator $validator
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function sellxd(MemberValidator $validator)
|
|
|
+ {
|
|
|
+ $params = request()->all();
|
|
|
+ $scene = isset($params['scene'])? $params['scene'] : 'recharge';
|
|
|
+ $params = $validator->check($params, $scene);
|
|
|
+ if (!is_array($params)) {
|
|
|
+ return showJson($params, false);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!$result = AcceptorService::make()->sellxd($this->userId, $params)){
|
|
|
+ $error = AcceptorService::make()->getError();
|
|
|
+ return showJson($error,false, [],$error== 2035? 405:0);
|
|
|
+ }else{
|
|
|
+ return showJson(AcceptorService::make()->getError(),true, $result);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|