Skip to content

Commit 322c97b

Browse files
author
srathod
committed
- Patched patch 1 from ashtru's Constants removal.
1 parent 540f33c commit 322c97b

22 files changed

Lines changed: 77 additions & 81 deletions

CustomerProfiles/create-customer-payment-profile.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function createCustomerPaymentProfile($existingcustomerprofileid, $phoneNumber){
1313
$refId = 'ref' . time();
1414

1515
$creditCard = new AnetAPI\CreditCardType();
16-
$creditCard->setCardNumber( \SampleCode\Constants::CREDIT_CARD_NUMBER_2);
17-
$creditCard->setExpirationDate( \SampleCode\Constants::EXPIRY_DATE);
18-
$creditCard->setCardCode( \SampleCode\Constants::CVV);
16+
$creditCard->setCardNumber( "4242424242424242");
17+
$creditCard->setExpirationDate( "2038-12");
18+
$creditCard->setCardCode( "142");
1919
$paymentCreditCard = new AnetAPI\PaymentType();
2020
$paymentCreditCard->setCreditCard($creditCard);
2121

@@ -63,5 +63,5 @@ function createCustomerPaymentProfile($existingcustomerprofileid, $phoneNumber){
6363
return $response;
6464
}
6565
if(!defined('DONT_RUN_SAMPLES'))
66-
createCustomerPaymentProfile(\SampleCode\Constants::CUSTOMER_PROFILE_ID,"000-000-0009");
66+
createCustomerPaymentProfile("36152127","000-000-0009");
6767
?>

CustomerProfiles/create-customer-profile-from-transaction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
define("AUTHORIZENET_LOG_FILE", "phplog");
77

8-
function createCustomerProfileFromTransaction($transId= \SampleCode\Constants::TRANS_ID_TO_CREATE_CUSTOMER_PROFILE)
8+
function createCustomerProfileFromTransaction($transId= "2249066517")
99
{
1010
// Common setup for API credentials
1111
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();
@@ -44,5 +44,5 @@ function createCustomerProfileFromTransaction($transId= \SampleCode\Constants::T
4444
}
4545
//provide a transaction that has customer information
4646
if(!defined('DONT_RUN_SAMPLES'))
47-
createCustomerProfileFromTransaction(\SampleCode\Constants::TRANS_ID_TO_CREATE_CUSTOMER_PROFILE);
47+
createCustomerProfileFromTransaction("2249066517");
4848
?>

CustomerProfiles/create-customer-profile.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ function createCustomerProfile($email){
1515

1616
// Create the payment data for a credit card
1717
$creditCard = new AnetAPI\CreditCardType();
18-
$creditCard->setCardNumber( \SampleCode\Constants::CREDIT_CARD_NUMBER);
19-
$creditCard->setExpirationDate( \SampleCode\Constants::EXPIRY_DATE);
18+
$creditCard->setCardNumber( "4111111111111111");
19+
$creditCard->setExpirationDate( "2038-12");
2020
$paymentCreditCard = new AnetAPI\PaymentType();
2121
$paymentCreditCard->setCreditCard($creditCard);
2222

@@ -71,5 +71,5 @@ function createCustomerProfile($email){
7171
return $response;
7272
}
7373
if(!defined('DONT_RUN_SAMPLES'))
74-
createCustomerProfile( \SampleCode\Constants::TEST_CUSTOMER_EMAIL);
74+
createCustomerProfile("test123@test.com");
7575
?>

CustomerProfiles/create-customer-shipping-address.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
define("AUTHORIZENET_LOG_FILE", "phplog");
77

8-
function createCustomerShippingAddress($existingcustomerprofileid = \SampleCode\Constants::CUSTOMER_PROFILE_ID,
9-
$phoneNumber= \SampleCode\Constants::PHONE_NUMBER)
8+
function createCustomerShippingAddress($existingcustomerprofileid = "36152127",
9+
$phoneNumber="000-000-0000")
1010
{
1111
// Common setup for API credentials
1212
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

CustomerProfiles/delete-customer-payment-profile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
define("AUTHORIZENET_LOG_FILE", "phplog");
77

8-
function deleteCustomerPaymentProfile($customerProfileId= \SampleCode\Constants::CUSTOMER_PROFILE_ID,
9-
$customerpaymentprofileid = \SampleCode\Constants::CUSTOMER_PAYMENT_PROFILE_ID)
8+
function deleteCustomerPaymentProfile($customerProfileId= "36152127",
9+
$customerpaymentprofileid = "32689274")
1010
{
1111
// Common setup for API credentials
1212
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

CustomerProfiles/delete-customer-profile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ function deleteCustomerProfile($customerProfileId)
3535
}
3636

3737
if(!defined('DONT_RUN_SAMPLES'))
38-
deleteCustomerProfile( \SampleCode\Constants::CUSTOMER_PAYMENT_PROFILE_ID_DELETE);
38+
deleteCustomerProfile("38958129");
3939
?>

CustomerProfiles/delete-customer-shipping-address.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
define("AUTHORIZENET_LOG_FILE", "phplog");
77

8-
function deleteCustomerShippingAddress($customerprofileid = \SampleCode\Constants::CUSTOMER_PROFILE_ID_2,
9-
$customeraddressid = "36976434")
8+
function deleteCustomerShippingAddress($customerprofileid = "36731856", $customeraddressid = "36976434")
109
{
1110
// Common setup for API credentials
1211
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

CustomerProfiles/get-customer-payment-profile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
define("AUTHORIZENET_LOG_FILE", "phplog");
99

10-
function getCustomerPaymentProfile($customerProfileId=\SampleCode\Constants::CUSTOMER_PROFILE_ID_2,
11-
$customerPaymentProfileId= \SampleCode\Constants::CUSTOMER_PAYMENT_PROFILE_ID_GET)
10+
function getCustomerPaymentProfile($customerProfileId="36731856",
11+
$customerPaymentProfileId= "33211899")
1212
{
1313
// Common setup for API credentials (merchant)
1414
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

CustomerProfiles/get-customer-shipping-address.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,5 @@ function getCustomerShippingAddress($customerprofileid, $customeraddressid)
6060
return $response;
6161
}
6262
if(!defined('DONT_RUN_SAMPLES'))
63-
getCustomerShippingAddress(\SampleCode\Constants::CUSTOMER_PROFILE_ID,
64-
\SampleCode\Constants::CUSTOMER_SHIPPING_ADDRESS_ID_GET);
63+
getCustomerShippingAddress("36152127","36976566");
6564
?>

CustomerProfiles/get-hosted-profile-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
define("AUTHORIZENET_LOG_FILE", "phplog");
77

8-
function getHostedProfilePage($customerprofileid = \SampleCode\Constants::CUSTOMER_PROFILE_ID_HOSTED_PAGE)
8+
function getHostedProfilePage($customerprofileid = "123212")
99
{
1010
// Common setup for API credentials
1111
$merchantAuthentication = new AnetAPI\MerchantAuthenticationType();

0 commit comments

Comments
 (0)