authorizenetsample 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcb652ca560ded3876b3ffa0cfb1310d8a2935d9
|
4
|
+
data.tar.gz: 502300797a8b503705b7f855400e70357d315e8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e723fc98164316b8a1e4fb24ba6aeb3f8ad7cbcc7d9d81688f13d7f9c598357fb8d9caeb9c6915a54d74a967c50a15964d3bd7477d480fbe00d64a292200e55
|
7
|
+
data.tar.gz: 71630f90629bc355dc30ebf32b6e401ee2ccb8c03c0b960890aae2afce78a1ae03baf24b4b3ecec775faee4d3f66c95a1a532e35b5698cf619106ae3c861586a
|
@@ -13,9 +13,17 @@ require 'securerandom'
|
|
13
13
|
transaction = Transaction.new(api_login_id, api_transaction_key, :gateway => :sandbox)
|
14
14
|
|
15
15
|
request = CreateTransactionRequest.new
|
16
|
+
|
17
|
+
billTo = CustomerAddressType.new
|
18
|
+
billTo.firstName = "John"
|
19
|
+
billTo.lastName = "Doe"
|
20
|
+
billTo.address = "123 My St"
|
21
|
+
billTo.city = "OurTown"
|
22
|
+
billTo.zip = "98004"
|
16
23
|
|
17
24
|
request.transactionRequest = TransactionRequestType.new()
|
18
25
|
request.transactionRequest.amount = ((SecureRandom.random_number + 1 ) * 150 ).round(2)
|
26
|
+
request.transactionRequest.billTo = billTo
|
19
27
|
request.transactionRequest.payment = PaymentType.new
|
20
28
|
# request.transactionRequest.payment.opaqueData = OpaqueDataType.new('COMMON.ACCEPT.INAPP.PAYMENT','eyJjb2RlIjoiNTBfMl8wNjAwMDUzQTczNERGMDY0MUMyMzUxMkIyQTM2MUE3QTBFQUQ4NTIxQ0EzQjM3MUU1REMyMjlEQkYwMjRERjI5QzdFOTJBMDIzNzJGRDVDQkI0ODRDMTQ2NDYyQ0U4NkFCRjA0Q0Y3IiwidG9rZW4iOiI5NTM5MzYyNzY1NjM2NTgyODA0NjA0IiwidiI6IjEuMSJ9')
|
21
29
|
request.transactionRequest.payment.opaqueData = OpaqueDataType.new('COMMON.ACCEPT.INAPP.PAYMENT',token)
|
@@ -24,6 +32,8 @@ require 'securerandom'
|
|
24
32
|
request.transactionRequest.order = OrderType.new("invoiceNumber#{(SecureRandom.random_number*1000000).round(0)}","Order Description")
|
25
33
|
|
26
34
|
response = transaction.create_transaction(request)
|
35
|
+
|
36
|
+
|
27
37
|
|
28
38
|
# if response != nil
|
29
39
|
# if response.messages.resultCode == MessageTypeEnum::Ok
|