-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update latest sdkv3 #65
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notes added. I also do not see any changes around recurring payments. There will be class/method changes for recurring as well as one-time card/check payments.
$token = new HpsTokenData(); | ||
$token->tokenValue = ($response != null | ||
? $response->token_value | ||
: ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this into buildCardHolder
and not renaming the method/variable is confusing from a maintenance perspective.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
classes/class-gf-securesubmit.php
Outdated
->withCurrency($currency) | ||
->withAddress($address) | ||
->withAllowDuplicates(true) | ||
->execute(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data within $secureEcommerce
and the level II / corporate purchasing card flag ($cpcReq
) are no long included in the original authorization request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkuma525 I may not have conveyed the right meaning here. The $secureEcommerce
and $cpcReq
values can still be used in the new SDK, but your original changes did not add these values to the authorization builder, causing them to not be included in the request to the gateway. We need both to be included in the gateway request to leverage both programs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated as per review comment
classes/class-gf-securesubmit.php
Outdated
->withCurrency($currency) | ||
->withAddress($address) | ||
->withAllowDuplicates(true) | ||
->execute(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data within $secureEcommerce
and the level II / corporate purchasing card flag ($cpcReq
) are no long included in the original authorization request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkuma525 I may not have conveyed the right meaning here. The $secureEcommerce
and $cpcReq
values can still be used in the new SDK, but your original changes did not add these values to the authorization builder, causing them to not be included in the request to the gateway. We need both to be included in the gateway request to leverage both programs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated as per review comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's rename buildCardHolder
and buildCheckHolder
and make sure they're being used correctly. The new SDK doesn't have a notion of a card/check holder object as this data now lives on either the payment data object (CreditCardData
or ECheck
) or on the Address
object. We also need to ensure that the correct payment data object is being used to initiate the transaction.
classes/class-gf-securesubmit.php
Outdated
@@ -1688,9 +1678,9 @@ private function buildCardHolder($feed, $submission_data, $entry) | |||
*/ | |||
private function buildCheckHolder($feed, $submission_data, $entry) | |||
{ | |||
$checkHolder = new HpsCheckHolder(); | |||
$checkHolder = new ECheck(); | |||
$checkHolder->address = $this->buildAddress($feed, $submission_data, $entry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should not be an address property on ECheck
, so this line can be removed once the address is added to the authorization builder for check transactions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated as per review comment
classes/class-gf-securesubmit.php
Outdated
$checkHolder->address = $this->buildAddress($feed, $submission_data, $entry); | ||
$checkHolder->checkName = htmlspecialchars(rgar($submission_data, 'ach_check_holder')); //'check holder'; | ||
$checkHolder->checkHolderName = htmlspecialchars(rgar($submission_data, 'ach_check_holder')); //'check holder'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should still be checkName
. The checkHolderName
property isn't mapped to the correct gateway field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated as per review comment
classes/class-gf-securesubmit.php
Outdated
$config->versionNumber = '1916';*/ | ||
$config = new ServicesConfig(); | ||
$config->secretApiKey = $key; | ||
$config->serviceUrl = "https://cert.api2.heartlandportico.com"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration needs to support production as well. We can check the key to determine which environment should be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated as per review comment
…ms-addon into update-latest-sdkv3
updated the code to latest sdk for credit card payment and check payment