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 ReferencedPayouts
8
{
9
    /**
10
     * @return array
11
     */
12
    private function mockCreateReferencedBatchPayoutResponse(): array
13
    {
14
        return Utils::jsonDecode('{
15
  "links": [
16
    {
17
      "href": "https://api-m.sandbox.paypal.com/v1/payments/referenced-payouts/CDZEC5MJ8R5HY",
18
      "rel": "self",
19
      "method": "GET"
20
    }
21
  ]
22
}', true);
23
    }
24
 
25
    /**
26
     * @return array
27
     */
28
    private function mockShowReferencedBatchPayoutResponse(): array
29
    {
30
        return Utils::jsonDecode('{
31
  "referenced_payouts": [
32
    {
33
      "item_id": "dVeQhMc5Ck5WPw2gWYDLzh3qM2Dp1XbRlZb9fDouzLzDhx1eMYYTFe3syHEKKx4=",
34
      "processing_state": {
35
        "status": "SUCCESS"
36
      },
37
      "reference_id": "2KP03934U4415543C",
38
      "reference_type": "TRANSACTION_ID",
39
      "payout_amount": {
40
        "currency_code": "USD",
41
        "value": "1.0"
42
      },
43
      "payout_destination": "KJDHGANDJ4DPZ",
44
      "payout_transaction_id": "3KP03934U4415543D",
45
      "disbursement_transaction_id": "4KP03934U4415543E",
46
      "links": [
47
        {
48
          "href": "https://api-m.sandbox.paypal.com/v1/payments/referenced-payouts-items/dVeQhMc5Ck5WPw2gWYDLzh3qM2Dp1XbRlZb9fDouzLzDhx1eMYYTFe3syHEKKx4=",
49
          "rel": "self",
50
          "method": "GET"
51
        }
52
      ]
53
    },
54
    {
55
      "item_id": "spK0ggOfijUiOUtbXBepp3h5tolruRWTl4aED-_6yz25POeNFABpkewSIxIXh4A=",
56
      "processing_state": {
57
        "status": "SUCCESS"
58
      },
59
      "reference_id": "8TA4226978212399L",
60
      "reference_type": "TRANSACTION_ID",
61
      "payout_amount": {
62
        "currency_code": "USD",
63
        "value": "1.0"
64
      },
65
      "payout_destination": "KJDHGANDJ4DPZ",
66
      "payout_transaction_id": "4KP03934U4415543D",
67
      "disbursement_transaction_id": "5KP03934U4415543E",
68
      "links": [
69
        {
70
          "href": "https://api-m.sandbox.paypal.com/v1/payments/referenced-payouts-items/spK0ggOfijUiOUtbXBepp3h5tolruRWTl4aED-_6yz25POeNFABpkewSIxIXh4A=",
71
          "rel": "self",
72
          "method": "GET"
73
        }
74
      ]
75
    }
76
  ],
77
  "payout_directive": {
78
    "destination": "CC-CDZEC5MJ8R5HY",
79
    "type": "FINANCIAL_INSTRUMENT_ID"
80
  },
81
  "links": [
82
    {
83
      "href": "https://api-m.sandbox.paypal.com/v1/payments/referenced-payouts/KHbwO28lWlXwi2IlToJ2IYNG4juFv6kpbFx4J9oQ5Hb24RSp96Dk5FudVHd6v4E=",
84
      "rel": "self",
85
      "method": "GET"
86
    }
87
  ]
88
}', true);
89
    }
90
 
91
    /**
92
     * @return array
93
     */
94
    private function mockCreateReferencedBatchPayoutItemResponse(): array
95
    {
96
        return Utils::jsonDecode('{
97
  "item_id": "SOMEITEMID",
98
  "links": [
99
    {
100
      "href": "https://api-m.sandbox.paypal.com/v1/payments/referenced-payouts-items/SOMEITEMID",
101
      "rel": "self",
102
      "method": "GET"
103
    }
104
  ]
105
}', true);
106
    }
107
 
108
    /**
109
     * @return array
110
     */
111
    private function mockShowReferencedBatchPayoutItemResponse(): array
112
    {
113
        return Utils::jsonDecode('{
114
  "item_id": "SOMEITEMID",
115
  "processing_state": {
116
    "status": "PROCESSING"
117
  },
118
  "reference_id": "CAPTURETXNID",
119
  "reference_type": "TRANSACTION_ID",
120
  "payout_amount": {
121
    "currency_code": "USD",
122
    "value": "2.0"
123
  },
124
  "payout_destination": "PAYERED",
125
  "payout_transaction_id": "PAYOUTTXNID",
126
  "links": [
127
    {
128
      "href": "https://api-m.paypal.com/v1/payments/referenced-payouts-items/SOMEITEMID",
129
      "rel": "self",
130
      "method": "GET"
131
    }
132
  ]
133
}', true);
134
    }
135
}