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\Responses;
4
 
5
use GuzzleHttp\Utils;
6
 
7
trait PaymentExperienceWebProfiles
8
{
9
    /**
10
     * @return array
11
     */
12
    private function mockListWebProfilesResponse(): 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 mockWebProfileResponse(): array
66
    {
67
        return Utils::jsonDecode('{
68
  "id": "XP-RFV4-PVD8-AGHJ-8E5J",
69
  "name": "exampleProfile",
70
  "temporary": false,
71
  "presentation": {
72
    "logo_image": "https://example.com/logo_image/"
73
  },
74
  "input_fields": {
75
    "no_shipping": 1,
76
    "address_override": 1
77
  },
78
  "flow_config": {
79
    "landing_page_type": "billing",
80
    "bank_txn_pending_url": "https://example.com/flow_config/",
81
    "user_action": "commit"
82
  }
83
}', true);
84
    }
85
}