Top Level Namespace

Defined Under Namespace

Modules: ActiveMerchant, Spree, SpreeAffirm

Instance Method Summary collapse

Instance Method Details

#BASE_CHECKOUT_DETAILSObject



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/spree_affirm/factories/affirm_checkout_factory.rb', line 1

def BASE_CHECKOUT_DETAILS
  {
    "merchant"=> {
      "public_api_key"=> "PPPPPPPPPPPPPPP",
      "user_cancel_url"=> "http=>//google.com/cancel",
      "user_confirmation_url"=> "http=>//google.com/confirm",
      "name"=> "Test Merchant"
    },
    "tax_amount"=> 0,
    "billing"=> {
      "address"=> {
        "city"=> "San Francisco",
        "street1"=> "12345 Main",
        "street2"=> "300",
        "region1_code"=> "AL",
        "postal_code"=> "55555",
        "country_code"=> "USA",
        "for_billing"=> true,
        "validation_source"=> 3
      },
      "email"=> "[email protected]",
      "name"=> {
        "for_billing"=> true,
        "last"=> "Doe",
        "first"=> "John"
      }
    },
    "items"=> {
      "xxx-xx-xxx-x"=> {
        "sku"=> "xxx-xx-xxx-x",
        "item_url"=> "http=>//google.com/products/the-blue-hat",
        "display_name"=> "The Blue Hat",
        "unit_price"=> 85000,
        "qty"=> 1,
        "item_type"=> "physical",
        "item_image_url"=> "http=>//google.com/products/6/large/the-blue-hat"
      }
    },
    "shipping"=> {
      "name"=> {
        "last"=> "Doe",
        "first"=> "John"
      },
      "address"=> {
        "city"=> "San Francisco",
        "street1"=> "12345 Main Street",
        "street2"=> "300",
        "region1_code"=> "AL",
        "postal_code"=> "94110",
        "country_code"=> "USA",
        "validation_source"=> 3
      }
    },
    "checkout_id"=> "S123123-456",
    "currency"=> "USD",
    "meta"=> {
      "release"=> "true",
      "user_timezone"=> "America/Los_Angeles",
      "__affirm_tracking_uuid"=> "97570a41-cd07-4f52-8869-46c6d2588407"
    },
    "discount_code"=> "",
    "misc_fee_amount"=> 0,
    "shipping_type"=> "Free National UPS",
    "config"=> {
      "required_billing_fields"=> [
        "name",
        "address",
        "email"
      ]
    },
    "api_version"=> "v2",
    "shipping_amount"=> 0
  }
end