authorizenetsample 1.1.9 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 78151bf69d37cbf19f535dd356cd378e51f2f81a
4
- data.tar.gz: 4a83a9b9d2671a338ac255d87d6ebe03b328a99f
3
+ metadata.gz: 34198052629e4d7415e21dbe494855db055dc7bb
4
+ data.tar.gz: 1af4917af8db1460acf98b70edcd935e05d3034c
5
5
  SHA512:
6
- metadata.gz: d2e5a8061fc6faf1684dcc4a0a14a2634555b0c418182c058328d5cee49d949f3780e44bc6f106a960c823be126a33a6f51ec5e222c167e23b282c5a0be5368c
7
- data.tar.gz: 163ebdebb88445eaf5600566936b9cbdd38bad657d67fa78771a9374f1bd2694a2052817cd839a873d6d11a95bc158ea56c8a5d2d83e98e0aeb9ccf59efaf450
6
+ metadata.gz: bf2332578759254b303340c37ed2261a6a42e59517531b84c8ddb1c7f0c96b7a4ac83360d2b81e29a0ac543ce5769ce3708470a77af646ad76bf73b13b223a1a
7
+ data.tar.gz: b56c3f3e044dec716d932a651f6cb675bc16fd52c100cf266dd41b9eb98a261faa50049ca94f6044921c60d8b25dd6937ef69d972db0d20375b66a768a1e5456
@@ -5,7 +5,7 @@ require 'securerandom'
5
5
 
6
6
  include AuthorizeNet::API
7
7
 
8
- def create_an_accept_payment_transaction(api_login_id,api_transaction_key,token)
8
+ def create_an_accept_payment_transaction(api_login_id,api_transaction_key,token,customerName)
9
9
  puts File.dirname(__FILE__)
10
10
  config = YAML.load_file(File.dirname(__FILE__) + "/../credentials.yml")
11
11
 
@@ -14,17 +14,19 @@ require 'securerandom'
14
14
 
15
15
  request = CreateTransactionRequest.new
16
16
 
17
- # billTo = CustomerAddressType.new
17
+ billTo = CustomerAddressType.new
18
18
  # billTo.firstName = "John"
19
19
  # billTo.lastName = "Doe"
20
- # billTo.address = "123 My St"
21
- # billTo.city = "OurTown"
22
- # billTo.zip = "98004"
20
+ billTo.firstName = customerName.split(" ").first
21
+ billTo.lastName = customerName.split(" ").last
22
+ billTo.address = "123 My St"
23
+ billTo.city = "OurTown"
24
+ billTo.zip = "98004"
23
25
 
24
26
  request.transactionRequest = TransactionRequestType.new()
25
27
  # request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 150 ).round(2)
26
28
  request.transactionRequest.amount = 99
27
- # request.transactionRequest.billTo = billTo
29
+ request.transactionRequest.billTo = billTo
28
30
  request.transactionRequest.payment = PaymentType.new
29
31
  # request.transactionRequest.payment.opaqueData = OpaqueDataType.new('COMMON.ACCEPT.INAPP.PAYMENT','eyJjb2RlIjoiNTBfMl8wNjAwMDUzQTczNERGMDY0MUMyMzUxMkIyQTM2MUE3QTBFQUQ4NTIxQ0EzQjM3MUU1REMyMjlEQkYwMjRERjI5QzdFOTJBMDIzNzJGRDVDQkI0ODRDMTQ2NDYyQ0U4NkFCRjA0Q0Y3IiwidG9rZW4iOiI5NTM5MzYyNzY1NjM2NTgyODA0NjA0IiwidiI6IjEuMSJ9')
30
32
  request.transactionRequest.payment.opaqueData = OpaqueDataType.new('COMMON.ACCEPT.INAPP.PAYMENT',token)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authorizenetsample
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.9
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Authorize.Net