Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
676 lars 1
<?php
2
 
3
namespace Srmklive\PayPal\Tests\Mocks\Requests;
4
 
5
use GuzzleHttp\Utils;
6
 
7
trait PaymentExperienceWebProfiles
8
{
9
    /**
10
     * @return array
11
     */
12
    private function mockCreateWebProfileParams(): array
13
    {
14
        return Utils::jsonDecode('[
15
  {
16
    "id": "XP-GCUV-X35G-HNEY-5MJY",
17
    "name": "exampleProfile",
18
    "flow_config": {
19
      "landing_page_type": "billing",
20
      "bank_txn_pending_url": "https://example.com/flow_config/"
21
    },
22
    "input_fields": {
23
      "no_shipping": 1,
24
      "address_override": 1
25
    },
26
    "presentation": {
27
      "logo_image": "https://example.com/logo_image/"
28
    }
29
  },
30
  {
31
    "id": "XP-A88A-LYLW-8Y3X-E5ER",
32
    "name": "exampleProfile",
33
    "flow_config": {
34
      "landing_page_type": "billing",
35
      "bank_txn_pending_url": "https://example.com/flow_config/"
36
    },
37
    "input_fields": {
38
      "no_shipping": 1,
39
      "address_override": 1
40
    },
41
    "presentation": {
42
      "logo_image": "https://example.com/logo_image/"
43
    }
44
  },
45
  {
46
    "id": "XP-RFV4-PVD8-AGHJ-8E5J",
47
    "name": "exampleProfile",
48
    "flow_config": {
49
      "bank_txn_pending_url": "https://example.com/flow_config/"
50
    },
51
    "input_fields": {
52
      "no_shipping": 1,
53
      "address_override": 1
54
    },
55
    "presentation": {
56
      "logo_image": "https://example.com/logo_image/"
57
    }
58
  }
59
]', true);
60
    }
61
 
62
    /**
63
     * @return array
64
     */
65
    private function partiallyUpdateWebProfileParams(): array
66
    {
67
        return Utils::jsonDecode('[
68
  {
69
    "op": "add",
70
    "path": "/presentation/brand_name",
71
    "value": "new_brand_name"
72
  },
73
  {
74
    "op": "remove",
75
    "path": "/flow_config/landing_page_type"
76
  }
77
]', true);
78
    }
79
 
80
    /**
81
     * @return array
82
     */
83
    private function updateWebProfileParams(): array
84
    {
85
        return Utils::jsonDecode('{
86
  "name": "exampleProfile",
87
  "presentation": {
88
    "logo_image": "https://example.com/logo_image/"
89
  },
90
  "input_fields": {
91
    "no_shipping": 1,
92
    "address_override": 1
93
  },
94
  "flow_config": {
95
    "landing_page_type": "billing",
96
    "bank_txn_pending_url": "https://example.com/flow_config/"
97
  }
98
}', true);
99
    }
100
}