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 Disputes
8
{
9
    /**
10
     * @return array
11
     */
12
    private function mockListDisputesResponse(): array
13
    {
14
        return Utils::jsonDecode('{
15
  "items": [
16
    {
17
      "dispute_id": "PP-000-003-648-191",
18
      "create_time": "2017-01-24T10:41:35.000Z",
19
      "update_time": "2017-01-24T11:40:32.000Z",
20
      "status": "WAITING_FOR_SELLER_RESPONSE",
21
      "reason": "MERCHANDISE_OR_SERVICE_NOT_RECEIVED",
22
      "dispute_state": "REQUIRED_OTHER_PARTY_ACTION",
23
      "dispute_amount": {
24
        "currency_code": "USD",
25
        "value": "50.00"
26
      },
27
      "links": [
28
        {
29
          "href": "https://api-m.sandbox.paypal.com/v1/customer/disputes/PP-000-003-648-191",
30
          "rel": "self",
31
          "method": "GET"
32
        }
33
      ]
34
    },
35
    {
36
      "dispute_id": "PP-000-003-648-175",
37
      "create_time": "2017-01-24T10:37:23.000Z",
38
      "update_time": "2017-01-24T11:32:32.000Z",
39
      "status": "UNDER_REVIEW",
40
      "reason": "UNAUTHORISED",
41
      "dispute_amount": {
42
        "currency_code": "USD",
43
        "value": "20.00"
44
      },
45
      "links": [
46
        {
47
          "href": "https://api-m.sandbox.paypal.com/v1/customer/disputes/PP-000-003-648-175",
48
          "rel": "self",
49
          "method": "GET"
50
        }
51
      ]
52
    }
53
  ],
54
  "links": [
55
    {
56
      "href": "https://api-m.sandbox.paypal.com/v1/customer/disputes",
57
      "rel": "self",
58
      "method": "GET"
59
    },
60
    {
61
      "href": "https://api-m.sandbox.paypal.com/v1/customer/disputes",
62
      "rel": "first",
63
      "method": "GET"
64
    }
65
  ]
66
}', true);
67
    }
68
 
69
    /**
70
     * @return array
71
     */
72
    private function mockGetDisputesResponse(): array
73
    {
74
        return Utils::jsonDecode('{
75
  "dispute_id": "PP-D-4012",
76
  "create_time": "2019-04-11T04:18:00.000Z",
77
  "update_time": "2019-04-21T04:19:08.000Z",
78
  "disputed_transactions": [
79
    {
80
      "seller_transaction_id": "3BC38643YC807283D",
81
      "create_time": "2019-04-11T04:16:58.000Z",
82
      "transaction_status": "REVERSED",
83
      "gross_amount": {
84
        "currency_code": "USD",
85
        "value": "192.00"
86
      },
87
      "buyer": {
88
        "name": "Lupe Justin"
89
      },
90
      "seller": {
91
        "email": "merchant@example.com",
92
        "merchant_id": "5U29WL78XSAEL",
93
        "name": "Lesley Paul"
94
      }
95
    }
96
  ],
97
  "reason": "MERCHANDISE_OR_SERVICE_NOT_AS_DESCRIBED",
98
  "status": "RESOLVED",
99
  "dispute_amount": {
100
    "currency_code": "USD",
101
    "value": "96.00"
102
  },
103
  "dispute_outcome": {
104
    "outcome_code": "RESOLVED_BUYER_FAVOUR",
105
    "amount_refunded": {
106
      "currency_code": "USD",
107
      "value": "96.00"
108
    }
109
  },
110
  "dispute_life_cycle_stage": "CHARGEBACK",
111
  "dispute_channel": "INTERNAL",
112
  "messages": [
113
    {
114
      "posted_by": "BUYER",
115
      "time_posted": "2019-04-11T04:18:04.000Z",
116
      "content": "SNAD case created through automation"
117
    }
118
  ],
119
  "extensions": {
120
    "merchandize_dispute_properties": {
121
      "issue_type": "SERVICE",
122
      "service_details": {
123
        "sub_reasons": [
124
          "INCOMPLETE"
125
        ],
126
        "purchase_url": "https://ebay.in"
127
      }
128
    }
129
  },
130
  "offer": {
131
    "buyer_requested_amount": {
132
      "currency_code": "USD",
133
      "value": "96.00"
134
    }
135
  },
136
  "links": [
137
    {
138
      "href": "https://api-m.sandbox.paypal.com/v1/customer/disputes/PP-D-4012",
139
      "rel": "self",
140
      "method": "GET"
141
    }
142
  ]
143
}', true);
144
    }
145
}