File tree 4 files changed +41
-7
lines changed 4 files changed +41
-7
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,13 @@ PayPal::SDK::REST.set_config(
101
101
:postal_code => " 43210" ,
102
102
:country_code => " US" }}}]},
103
103
:transactions => [{
104
+ :item_list => {
105
+ :items => [{
106
+ :name => " item" ,
107
+ :sku => " item" ,
108
+ :price => " 1" ,
109
+ :currency => " USD" ,
110
+ :quantity => 1 }]},
104
111
:amount => {
105
112
:total => " 1.00" ,
106
113
:currency => " USD" },
Original file line number Diff line number Diff line change 11
11
# the above types and intent as 'sale'
12
12
@payment = Payment . new ( {
13
13
:intent => "sale" ,
14
-
14
+
15
15
# ###Payer
16
16
# A resource representing a Payer that funds a payment
17
17
# Use the List of `FundingInstrument` and the Payment Method
18
18
# as 'credit_card'
19
19
:payer => {
20
20
:payment_method => "credit_card" ,
21
-
21
+
22
22
# ###FundingInstrument
23
23
# A resource representing a Payeer's funding instrument.
24
24
# Use a Payer ID (A unique identifier of the payer generated
25
25
# and provided by the facilitator. This is required when
26
26
# creating or using a tokenized funding instrument)
27
27
# and the `CreditCardDetails`
28
28
:funding_instruments => [ {
29
-
29
+
30
30
# ###CreditCard
31
31
# A resource representing a credit card that can be
32
32
# used to fund a payment.
38
38
:cvv2 => "874" ,
39
39
:first_name => "Joe" ,
40
40
:last_name => "Shopper" ,
41
-
41
+
42
42
# ###Address
43
43
# Base Address used as shipping or billing
44
44
# address in a payment. [Optional]
53
53
# payment - what is the payment for and who
54
54
# is fulfilling it.
55
55
:transactions => [ {
56
-
56
+
57
+ # Item List
58
+ :item_list => {
59
+ :items => [ {
60
+ :name => "item" ,
61
+ :sku => "item" ,
62
+ :price => "1" ,
63
+ :currency => "USD" ,
64
+ :quantity => 1 } ] } ,
65
+
57
66
# ###Amount
58
67
# Let's you specify a payment amount.
59
68
:amount => {
Original file line number Diff line number Diff line change 35
35
# is fulfilling it
36
36
:transactions => [ {
37
37
38
+ # Item List
39
+ :item_list => {
40
+ :items => [ {
41
+ :name => "item" ,
42
+ :sku => "item" ,
43
+ :price => "1" ,
44
+ :currency => "USD" ,
45
+ :quantity => 1 } ] } ,
46
+
38
47
# ###Amount
39
48
# Let's you specify a payment amount.
40
49
:amount => {
Original file line number Diff line number Diff line change 27
27
# A transaction defines the contract of a
28
28
# payment - what is the payment for and who
29
29
# is fulfilling it.
30
- :transactions => [ {
30
+ :transactions => [ {
31
+
32
+ # Item List
33
+ :item_list => {
34
+ :items => [ {
35
+ :name => "item" ,
36
+ :sku => "item" ,
37
+ :price => "5" ,
38
+ :currency => "USD" ,
39
+ :quantity => 1 } ] } ,
31
40
32
41
# ###Amount
33
42
# Let's you specify a payment amount.
34
43
:amount => {
35
44
:total => "5" ,
36
45
:currency => "USD" } ,
37
- :description => "This is the payment transaction description." } ] } )
46
+ :description => "This is the payment transaction description." } ] } )
38
47
39
48
# Create Payment and return status
40
49
if @payment . create
You can’t perform that action at this time.
0 commit comments