PartnerReferrals.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <?php
  2. namespace Srmklive\PayPal\Tests\Mocks\Requests;
  3. use GuzzleHttp\Utils;
  4. trait PartnerReferrals
  5. {
  6. private function mockCreatePartnerReferralParams(): array
  7. {
  8. return Utils::jsonDecode('{
  9. "individual_owners": [
  10. {
  11. "names": [
  12. {
  13. "prefix": "Mr.",
  14. "given_name": "John",
  15. "surname": "Doe",
  16. "middle_name": "Middle",
  17. "suffix": "Jr.",
  18. "full_name": "John Middle Doe Jr.",
  19. "type": "LEGAL"
  20. }
  21. ],
  22. "citizenship": "US",
  23. "addresses": [
  24. {
  25. "address_line_1": "One Washington Square",
  26. "address_line_2": "Apt 123",
  27. "admin_area_2": "San Jose",
  28. "admin_area_1": "CA",
  29. "postal_code": "95112",
  30. "country_code": "US",
  31. "type": "HOME"
  32. }
  33. ],
  34. "phones": [
  35. {
  36. "country_code": "1",
  37. "national_number": "6692468839",
  38. "extension_number": "1234",
  39. "type": "MOBILE"
  40. }
  41. ],
  42. "birth_details": {
  43. "date_of_birth": "1955-12-29"
  44. },
  45. "type": "PRIMARY"
  46. }
  47. ],
  48. "business_entity": {
  49. "business_type": {
  50. "type": "INDIVIDUAL",
  51. "subtype": "ASSO_TYPE_INCORPORATED"
  52. },
  53. "business_industry": {
  54. "category": "1004",
  55. "mcc_code": "2025",
  56. "subcategory": "8931"
  57. },
  58. "business_incorporation": {
  59. "incorporation_country_code": "US",
  60. "incorporation_date": "1986-12-29"
  61. },
  62. "names": [
  63. {
  64. "business_name": "Test Enterprise",
  65. "type": "LEGAL_NAME"
  66. }
  67. ],
  68. "emails": [
  69. {
  70. "type": "CUSTOMER_SERVICE",
  71. "email": "customerservice@example.com"
  72. }
  73. ],
  74. "website": "https://mystore.testenterprises.com",
  75. "addresses": [
  76. {
  77. "address_line_1": "One Washington Square",
  78. "address_line_2": "Apt 123",
  79. "admin_area_2": "San Jose",
  80. "admin_area_1": "CA",
  81. "postal_code": "95112",
  82. "country_code": "US",
  83. "type": "WORK"
  84. }
  85. ],
  86. "phones": [
  87. {
  88. "country_code": "1",
  89. "national_number": "6692478833",
  90. "extension_number": "1234",
  91. "type": "CUSTOMER_SERVICE"
  92. }
  93. ],
  94. "beneficial_owners": {
  95. "individual_beneficial_owners": [
  96. {
  97. "names": [
  98. {
  99. "prefix": "Mr.",
  100. "given_name": "John",
  101. "surname": "Doe",
  102. "middle_name": "Middle",
  103. "suffix": "Jr.",
  104. "full_name": "John Middle Doe Jr.",
  105. "type": "LEGAL"
  106. }
  107. ],
  108. "citizenship": "US",
  109. "addresses": [
  110. {
  111. "address_line_1": "One Washington Square",
  112. "address_line_2": "Apt 123",
  113. "admin_area_2": "San Jose",
  114. "admin_area_1": "CA",
  115. "postal_code": "95112",
  116. "country_code": "US",
  117. "type": "HOME"
  118. }
  119. ],
  120. "phones": [
  121. {
  122. "country_code": "1",
  123. "national_number": "6692468839",
  124. "extension_number": "1234",
  125. "type": "MOBILE"
  126. }
  127. ],
  128. "birth_details": {
  129. "date_of_birth": "1955-12-29"
  130. },
  131. "percentage_of_ownership": "50"
  132. }
  133. ],
  134. "business_beneficial_owners": [
  135. {
  136. "business_type": {
  137. "type": "INDIVIDUAL",
  138. "subtype": "ASSO_TYPE_INCORPORATED"
  139. },
  140. "business_industry": {
  141. "category": "1004",
  142. "mcc_code": "2025",
  143. "subcategory": "8931"
  144. },
  145. "business_incorporation": {
  146. "incorporation_country_code": "US",
  147. "incorporation_date": "1986-12-29"
  148. },
  149. "names": [
  150. {
  151. "business_name": "Test Enterprise",
  152. "type": "LEGAL_NAME"
  153. }
  154. ],
  155. "emails": [
  156. {
  157. "type": "CUSTOMER_SERVICE",
  158. "email": "customerservice@example.com"
  159. }
  160. ],
  161. "website": "https://mystore.testenterprises.com",
  162. "addresses": [
  163. {
  164. "address_line_1": "One Washington Square",
  165. "address_line_2": "Apt 123",
  166. "admin_area_2": "San Jose",
  167. "admin_area_1": "CA",
  168. "postal_code": "95112",
  169. "country_code": "US",
  170. "type": "WORK"
  171. }
  172. ],
  173. "phones": [
  174. {
  175. "country_code": "1",
  176. "national_number": "6692478833",
  177. "extension_number": "1234",
  178. "type": "CUSTOMER_SERVICE"
  179. }
  180. ],
  181. "percentage_of_ownership": "50"
  182. }
  183. ]
  184. },
  185. "office_bearers": [
  186. {
  187. "names": [
  188. {
  189. "prefix": "Mr.",
  190. "given_name": "John",
  191. "surname": "Doe",
  192. "middle_name": "Middle",
  193. "suffix": "Jr.",
  194. "full_name": "John Middle Doe Jr.",
  195. "type": "LEGAL"
  196. }
  197. ],
  198. "citizenship": "US",
  199. "addresses": [
  200. {
  201. "address_line_1": "One Washington Square",
  202. "address_line_2": "Apt 123",
  203. "admin_area_2": "San Jose",
  204. "admin_area_1": "CA",
  205. "postal_code": "95112",
  206. "country_code": "US",
  207. "type": "HOME"
  208. }
  209. ],
  210. "phones": [
  211. {
  212. "country_code": "1",
  213. "national_number": "6692468839",
  214. "extension_number": "1234",
  215. "type": "MOBILE"
  216. }
  217. ],
  218. "birth_details": {
  219. "date_of_birth": "1955-12-29"
  220. },
  221. "role": "DIRECTOR"
  222. }
  223. ],
  224. "annual_sales_volume_range": {
  225. "minimum_amount": {
  226. "currency_code": "USD",
  227. "value": "10000"
  228. },
  229. "maximum_amount": {
  230. "currency_code": "USD",
  231. "value": "50000"
  232. }
  233. },
  234. "average_monthly_volume_range": {
  235. "minimum_amount": {
  236. "currency_code": "USD",
  237. "value": "1000"
  238. },
  239. "maximum_amount": {
  240. "currency_code": "USD",
  241. "value": "50000"
  242. }
  243. },
  244. "purpose_code": "P0104"
  245. },
  246. "email": "accountemail@example.com",
  247. "preferred_language_code": "en-US",
  248. "tracking_id": "testenterprices123122",
  249. "partner_config_override": {
  250. "partner_logo_url": "https://www.paypalobjects.com/webstatic/mktg/logo/pp_cc_mark_111x69.jpg",
  251. "return_url": "https://testenterprises.com/merchantonboarded",
  252. "return_url_description": "the url to return the merchant after the paypal onboarding process.",
  253. "action_renewal_url": "https://testenterprises.com/renew-exprired-url",
  254. "show_add_credit_card": true
  255. },
  256. "operations": [
  257. {
  258. "operation": "BANK_ADDITION"
  259. }
  260. ],
  261. "financial_instruments": {
  262. "banks": [
  263. {
  264. "nick_name": "Bank of America",
  265. "account_number": "123405668293",
  266. "account_type": "CHECKING",
  267. "currency_code": "USD",
  268. "identifiers": [
  269. {
  270. "type": "ROUTING_NUMBER_1",
  271. "value": "123456789"
  272. }
  273. ]
  274. }
  275. ]
  276. },
  277. "legal_consents": [
  278. {
  279. "type": "SHARE_DATA_CONSENT",
  280. "granted": true
  281. }
  282. ],
  283. "products": [
  284. "EXPRESS_CHECKOUT"
  285. ]
  286. }', true);
  287. }
  288. }