authorizenetsample 0.4 → 0.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3801fb13ff0d036a6a025d59bcea6de3f07393f3
|
4
|
+
data.tar.gz: 1e355bdfb3bd111d076fd81be1fb47f1a8e3b97d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c72e6cc15d98b8649ff0ad3c05ff2b0adf0a3761843f92fd3a68bfd24b08b45e276b56cddf2fb1520c00c947fddddbf46300dc6257a0ceb2a0e3e476394205e3
|
7
|
+
data.tar.gz: 4a1ca6ef9fed342947154191a1ae0968150f082955933976fe4465bb097955ba7c0ff020e607d3a2bffab23bc2ddd26e7593dbd260e1e4d260514278b06dfc6c
|
@@ -5,7 +5,7 @@ require 'securerandom'
|
|
5
5
|
|
6
6
|
include AuthorizeNet::API
|
7
7
|
|
8
|
-
def get_accept_customer_profile_page(customerProfileId = '37696245')
|
8
|
+
def get_accept_customer_profile_page(api_login_id,api_transaction_key,iframeCommunicatorUrl,customerProfileId = '37696245')
|
9
9
|
config = YAML.load_file(File.dirname(__FILE__) + "/../credentials.yml")
|
10
10
|
|
11
11
|
transaction = Transaction.new(config['api_login_id'], config['api_transaction_key'], :gateway => :sandbox)
|
@@ -13,8 +13,12 @@ require 'securerandom'
|
|
13
13
|
setting = SettingType.new
|
14
14
|
setting.settingName = SettingNameEnum::HostedProfileReturnUrl
|
15
15
|
setting.settingValue = "https://returnurl.com/return/"
|
16
|
+
|
17
|
+
setting1 = SettingType.new
|
18
|
+
setting1.settingName = SettingNameEnum::hostedProfileIFrameCommunicatorUrl
|
19
|
+
setting1.settingValue = iframeCommunicatorUrl
|
16
20
|
|
17
|
-
settings = Settings.new([setting])
|
21
|
+
settings = Settings.new([setting,setting1])
|
18
22
|
|
19
23
|
|
20
24
|
request = GetHostedProfilePageRequest.new
|
@@ -5,7 +5,7 @@ require 'securerandom'
|
|
5
5
|
|
6
6
|
include AuthorizeNet::API
|
7
7
|
|
8
|
-
def get_customer_profile(customerProfileId = '40036377')
|
8
|
+
def get_customer_profile(api_login_id,api_transaction_key,customerProfileId = '40036377')
|
9
9
|
config = YAML.load_file(File.dirname(__FILE__) + "/../credentials.yml")
|
10
10
|
|
11
11
|
transaction = Transaction.new(config['api_login_id'], config['api_transaction_key'], :gateway => :sandbox)
|
@@ -5,14 +5,20 @@ require 'securerandom'
|
|
5
5
|
|
6
6
|
include AuthorizeNet::API
|
7
7
|
|
8
|
-
def get_an_accept_payment_page()
|
8
|
+
def get_an_accept_payment_page(api_login_id,api_transaction_key,customerId,iframeCommunicatorUrl)
|
9
9
|
config = YAML.load_file(File.dirname(__FILE__) + "/../credentials.yml")
|
10
10
|
|
11
11
|
transaction = Transaction.new(config['api_login_id'], config['api_transaction_key'], :gateway => :sandbox)
|
12
12
|
|
13
|
+
custProfile = CustomerProfilePaymentType.new
|
14
|
+
custProfile.customerProfileId = customerId
|
15
|
+
|
16
|
+
|
17
|
+
|
13
18
|
transactionRequest = TransactionRequestType.new
|
14
19
|
transactionRequest.amount = 12.12
|
15
20
|
transactionRequest.transactionType = TransactionTypeEnum::AuthCaptureTransaction
|
21
|
+
transactionRequest.profile = custProfile
|
16
22
|
|
17
23
|
setting1 = SettingType.new
|
18
24
|
setting1.settingName = SettingNameEnum::HostedPaymentButtonOptions
|
@@ -21,8 +27,13 @@ require 'securerandom'
|
|
21
27
|
setting2 = SettingType.new
|
22
28
|
setting2.settingName = SettingNameEnum::HostedPaymentOrderOptions
|
23
29
|
setting2.settingValue = "{\"show\": false}"
|
30
|
+
|
31
|
+
setting3 = SettingType.new
|
32
|
+
setting3.settingName = SettingNameEnum::hostedPaymentIFrameCommunicatorUrl
|
33
|
+
setting3.settingValue = "{\"url\": #{iframeCommunicatorUrl}}"
|
34
|
+
|
24
35
|
|
25
|
-
settings = Settings.new([ setting1, setting2])
|
36
|
+
settings = Settings.new([ setting1, setting2,setting3])
|
26
37
|
|
27
38
|
request = GetHostedPaymentPageRequest.new
|
28
39
|
request.transactionRequest = transactionRequest
|