Payouts.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace Srmklive\PayPal\Tests\Mocks\Requests;
  3. use GuzzleHttp\Utils;
  4. trait Payouts
  5. {
  6. /**
  7. * @return array
  8. */
  9. private function mockCreateBatchPayoutParams(): array
  10. {
  11. return Utils::jsonDecode('{
  12. "sender_batch_header": {
  13. "sender_batch_id": "Payouts_2018_100007",
  14. "email_subject": "You have a payout!",
  15. "email_message": "You have received a payout! Thanks for using our service!"
  16. },
  17. "items": [
  18. {
  19. "recipient_type": "EMAIL",
  20. "amount": {
  21. "value": "9.87",
  22. "currency": "USD"
  23. },
  24. "note": "Thanks for your patronage!",
  25. "sender_item_id": "201403140001",
  26. "receiver": "receiver@example.com",
  27. "alternate_notification_method": {
  28. "phone": {
  29. "country_code": "91",
  30. "national_number": "9999988888"
  31. }
  32. },
  33. "notification_language": "fr-FR"
  34. },
  35. {
  36. "recipient_type": "PHONE",
  37. "amount": {
  38. "value": "112.34",
  39. "currency": "USD"
  40. },
  41. "note": "Thanks for your support!",
  42. "sender_item_id": "201403140002",
  43. "receiver": "91-734-234-1234"
  44. },
  45. {
  46. "recipient_type": "PAYPAL_ID",
  47. "amount": {
  48. "value": "5.32",
  49. "currency": "USD"
  50. },
  51. "note": "Thanks for your patronage!",
  52. "sender_item_id": "201403140003",
  53. "receiver": "G83JXTJ5EHCQ2"
  54. }
  55. ]
  56. }', true);
  57. }
  58. }