QappKuaishouReport.php 1018 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace General\Services\Report;
  3. use General\Models\Report\ReportUserBindRecord;
  4. use App\Consts\BaseConst;
  5. /**
  6. * 快手数据上报
  7. */
  8. class QappKuaishouReport extends BaseReport
  9. {
  10. public function __construct()
  11. {
  12. $this->charge_event_type = 3;
  13. $this->register_event_type = 1;
  14. $this->report_url = 'http://ad.partner.gifshow.com/track/activate';
  15. }
  16. public function getRegisterQueryParams(ReportUserBindRecord $user): array
  17. {
  18. return [
  19. 'callback' => $user->callback,
  20. 'event_type' => $this->register_event_type,
  21. 'event_time' => time() * 1000,
  22. 'source' => BaseConst::Platform,
  23. ];
  24. }
  25. public function getChargeQueryParams(ReportUserBindRecord $user, float $amount): array
  26. {
  27. return [
  28. 'callback' => $user->callback,
  29. 'event_type' => $this->charge_event_type,
  30. 'event_time' => time() * 1000,
  31. 'purchase_amount' => $amount,
  32. ];
  33. }
  34. }