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 Orders
8
{
9
    /*
10
    * @return array
11
    */
12
    private function createOrderParams(): array
13
    {
14
        return Utils::jsonDecode('{
15
            "intent": "CAPTURE",
16
            "purchase_units": [
17
              {
18
                "amount": {
19
                  "currency_code": "USD",
20
                  "value": "100.00"
21
                }
22
              }
23
            ]
24
          }', true);
25
    }
26
 
27
    /*
28
    * @return array
29
    */
30
    private function updateOrderParams(): array
31
    {
32
        return Utils::jsonDecode('[
33
        {
34
          "op": "replace",
35
          "path": "/purchase_units/@reference_id==\'PUHF\'/shipping/address",
36
          "value": {
37
            "address_line_1": "123 Townsend St",
38
            "address_line_2": "Floor 6",
39
            "admin_area_2": "San Francisco",
40
            "admin_area_1": "CA",
41
            "postal_code": "94107",
42
            "country_code": "US"
43
          }
44
        }
45
      ]', true);
46
    }
47
}