蛋蛋星球-制度模式
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

66 righe
4.5 KiB

  1. package paypal
  2. const (
  3. Success = 0
  4. HeaderAuthorization = "Authorization" // 请求头Auth
  5. AuthorizationPrefixBasic = "Basic "
  6. AuthorizationPrefixBearer = "Bearer "
  7. baseUrlProd = "https://api-m.paypal.com" // 正式 URL
  8. baseUrlSandbox = "https://api-m.sandbox.paypal.com" // 沙箱 URL
  9. // 获取AccessToken
  10. getAccessToken = "/v1/oauth2/token" // 获取AccessToken POST
  11. // 订单相关
  12. orderCreate = "/v2/checkout/orders" // 创建订单 POST
  13. orderUpdate = "/v2/checkout/orders/%s" // order_id 更新订单 PATCH
  14. orderDetail = "/v2/checkout/orders/%s" // order_id 订单详情 GET
  15. orderAuthorize = "/v2/checkout/orders/%s/authorize" // order_id 订单支付授权 POST
  16. orderCapture = "/v2/checkout/orders/%s/capture" // order_id 订单支付捕获 POST
  17. orderConfirm = "/v2/checkout/orders/%s/confirm-payment-source" // order_id 订单支付确认 POST
  18. // 支付相关
  19. paymentAuthorizeDetail = "/v2/payments/authorizations/%s" // authorization_id 支付授权详情 GET
  20. paymentAuthorizeCapture = "/v2/payments/authorizations/%s/capture" // authorization_id 支付授权捕获 POST
  21. paymentReauthorize = "/v2/payments/authorizations/%s/reauthorize" // authorization_id 重新授权支付授权 POST
  22. paymentAuthorizeVoid = "/v2/payments/authorizations/%s/void" // authorization_id 作废支付授权 POST
  23. paymentCaptureDetail = "/v2/payments/captures/%s" // capture_id 支付捕获详情 GET
  24. paymentCaptureRefund = "/v2/payments/captures/%s/refund" // capture_id 支付捕获退款 POST
  25. paymentRefundDetail = "/v2/payments/refunds/%s" // refund_id 支付退款详情 GET
  26. // 支出相关
  27. createBatchPayout = "/v1/payments/payouts" // 创建批量支出 POST
  28. showPayoutBatchDetail = "/v1/payments/payouts/%s" // payout_batch_id 获取批量支出详情 GET
  29. showPayoutItemDetail = "/v1/payments/payouts-item/%s" // payout_item_id 获取支出项目详情 GET
  30. cancelUnclaimedPayoutItem = "/v1/payments/payouts-item/%s/cancel" // payout_item_id 取消支出项目 POST
  31. // 订阅相关
  32. subscriptionCreate = "/v1/billing/plans" // 创建订阅 POST
  33. // 发票 Invoices 相关
  34. generateInvoiceNumber = "/v2/invoicing/generate-next-invoice-number" // 生成发票号码 POST
  35. invoiceList = "/v2/invoicing/invoices" // 获取发票列表 GET
  36. createDraftInvoice = "/v2/invoicing/invoices" // 创建拟发票 POST
  37. deleteInvoice = "/v2/invoicing/invoices/%s" // invoice_id 删除发票 DELETE
  38. fullyUpdateInvoice = "/v2/invoicing/invoices/%s" // invoice_id 全量更新发票 PUT
  39. showInvoiceDetail = "/v2/invoicing/invoices/%s" // invoice_id 获取发票详情 GET
  40. cancelSentInvoice = "/v2/invoicing/invoices/%s/cancel" // invoice_id 取消已发送发票 POST
  41. generateInvoiceQRCode = "/v2/invoicing/invoices/%s/generate-qr-code" // invoice_id 生成发票二维码 POST
  42. recordPaymentForInvoice = "/v2/invoicing/invoices/%s/payments" // invoice_id 记录发票付款 POST
  43. deleteExternalPayment = "/v2/invoicing/invoices/%s/payments/%s" // invoice_id,transaction_id 删除额外支付 DELETE
  44. recordRefundForInvoice = "/v2/invoicing/invoices/%s/refunds" // invoice_id 记录发票退款 POST
  45. deleteExternalRefund = "/v2/invoicing/invoices/%s/refunds/%s" // invoice_id,transaction_id 删除额外退款 DELETE
  46. sendInvoiceReminder = "/v2/invoicing/invoices/%s/remind" // invoice_id 发送发票提醒 POST
  47. sendInvoice = "/v2/invoicing/invoices/%s/send" // invoice_id 发送发票 POST
  48. searchInvoice = "/v2/invoicing/search-invoices" // 搜索发票 POST
  49. invoiceTemplateList = "/v2/invoicing/templates" // 获取发票模板列表 GET
  50. createInvoiceTemplate = "/v2/invoicing/templates" // 创建发票模板 POST
  51. deleteInvoiceTemplate = "/v2/invoicing/templates/%s" // template_id 删除发票模板 DELETE
  52. fullyUpdateInvoiceTemplate = "/v2/invoicing/templates/%s" // template_id 全量更新发票模板 PUT
  53. // 物流相关
  54. addTrackingNumber = "/v2/checkout/orders/%s/track" // order_id 授权物流信息 POST
  55. )