Skip to content
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

Release Package Version 3.0.1.1 #36

Merged
merged 25 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c71c420
PW-6485-OMSRefactoring
vkuncham Oct 11, 2022
a597484
Leveraging AdyenClient model instead of AdyenService model to make ca…
ShubhamVijaivargiya Dec 15, 2022
d3a26e7
Addressing review comments
ShubhamVijaivargiya Dec 16, 2022
31148ac
Merge pull request #18 from Adyen/PW-6485-RefactoringOMScodefor2GP
ShubhamVijaivargiya Dec 30, 2022
31712f1
ModelUpdatePW7289
ShubhamVijaivargiya Jan 1, 2023
046fbca
Convert recurringProcessingModel from string to enum
ShubhamVijaivargiya Jan 5, 2023
b2a40ce
Merge pull request #21 from Adyen/PW7289
ShubhamVijaivargiya Jan 13, 2023
891bbdf
Introducing Webhook Models
ShubhamVijaivargiya Jan 31, 2023
8816fb7
Adding relevant comments
ShubhamVijaivargiya Jan 31, 2023
461a76f
Delete idea folder
ShubhamVijaivargiya Feb 10, 2023
eee8e31
Merge pull request #22 from Adyen/WebhookModelPW7609
ShubhamVijaivargiya Feb 10, 2023
7c7764a
Changing model from AdditionalData to LineItem array for checkout api
Jul 18, 2023
a69c1bf
Adding LineItem class
Jul 18, 2023
5a8f839
Increasing unit test coverage
Jul 19, 2023
31ab193
Merge pull request #24 from Adyen/feature/SFI-269
ShubhamVijaivargiya Aug 2, 2023
92d4025
Release 3Dot0Dot0 (#25)
ShubhamVijaivargiya Aug 10, 2023
0e14ebf
feat: updating code owners for this repository
Oct 16, 2023
c4c96a3
Merge pull request #28 from Adyen/feature/SFI-162-release-3dot0dot0dot0
dcardos Oct 16, 2023
98f75b9
Merge branch 'main' into develop
elhanarinc Oct 16, 2023
34dfde4
Merge pull request #29 from Adyen/main
elhanarinc Oct 16, 2023
c49603a
feat: add blockedPaymentMethods to the request (#30)
shanikantsingh Oct 31, 2023
4b6a0c7
AppInfoForCaptureAndRefundRequests_SFI290 (#31)
ShubhamVijaivargiya Dec 12, 2023
46a174c
feat: added additionalData and recurrent contract notification consta…
dcardos Jan 31, 2024
0dc29bc
Update patch version 3.0.1.1
dcardos Feb 19, 2024
077bec4
Merge branch 'main' into develop
ShubhamVijaivargiya Feb 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 27 additions & 24 deletions force-app/main/default/classes/AdyenConstants.cls
Original file line number Diff line number Diff line change
@@ -1,67 +1,70 @@
@namespaceAccessible
@NamespaceAccessible
public with sharing class AdyenConstants {

@namespaceAccessible
@NamespaceAccessible
public static final String DEFAULT_ADAPTER_NAME = 'AdyenDefault';

@namespaceAccessible
@NamespaceAccessible
public static final String NOTIFICATION_REQUEST_TYPE_CANCEL = 'cancellation';

@namespaceAccessible
@NamespaceAccessible
public static final String NOTIFICATION_REQUEST_TYPE_AUTHORISE = 'authorization';

@namespaceAccessible
@NamespaceAccessible
public static final String NOTIFICATION_REQUEST_TYPE_CAPTURE_FAILED = 'capture-failed';

@namespaceAccessible
@NamespaceAccessible
public static final String NOTIFICATION_REQUEST_TYPE_CAPTURE = 'capture';

@namespaceAccessible
@NamespaceAccessible
public static final String NOTIFICATION_REQUEST_TYPE_REFUND = 'refund';

@namespaceAccessible
@NamespaceAccessible
public static final String NOTIFICATION_REQUEST_TYPE_RECURRING_CONTRACT = 'recurring_contract';

@NamespaceAccessible
public static final String NOTIFICATION_ACCEPTED_RESPONSE = '[accepted]';

@namespaceAccessible
@NamespaceAccessible
public static final String NOTIFICATION_RECEIVED_CHECKOUT = 'received';

@namespaceAccessible
@NamespaceAccessible
public static final String TEST_MERCHANT_ACCOUNT = 'TEST_MERCHANT_ACCOUNT';

@namespaceAccessible
@NamespaceAccessible
public static final String TEST_REFERENCE = 'TEST_REFERENCE';

@namespaceAccessible
@NamespaceAccessible
public static final String TEST_STATUS = 'TEST_STATUS';

@namespaceAccessible
@NamespaceAccessible
public static final String TEST_PSP_REFERENCE = 'TEST_PSP_REFERENCE';

@namespaceAccessible
@NamespaceAccessible
public static final String TEST_PAYMENT_PSP_REFERENCE = 'TEST_PAYMENT_PSP_REFERENCE';

@namespaceAccessible
@NamespaceAccessible
public static final CommercePayments.SalesforceResultCodeInfo SUCCESS_SALESFORCE_RESULT_CODE_INFO =
new CommercePayments.SalesforceResultCodeInfo(CommercePayments.SalesforceResultCode.Success);

@namespaceAccessible
@NamespaceAccessible
public static final CommercePayments.SalesforceResultCodeInfo DECLINE_SALESFORCE_RESULT_CODE_INFO =
new CommercePayments.SalesforceResultCodeInfo(CommercePayments.SalesforceResultCode.Decline);

@namespaceAccessible
@NamespaceAccessible
public static final CommercePayments.SalesforceResultCodeInfo SYSTEM_ERROR_SALESFORCE_RESULT_CODE_INFO =
new CommercePayments.SalesforceResultCodeInfo(CommercePayments.SalesforceResultCode.SystemError);

@namespaceAccessible
@NamespaceAccessible
public static final CommercePayments.SalesforceResultCodeInfo VALIDATION_ERROR_SALESFORCE_RESULT_CODE_INFO =
new CommercePayments.SalesforceResultCodeInfo(CommercePayments.SalesforceResultCode.ValidationError);

@namespaceAccessible
public static final Integer HTTP_SUCCESS_CODE = 200;
@NamespaceAccessible
public static final Integer HTTP_SUCCESS_CODE = 200;

@namespaceAccessible
public static final Integer HTTP_ERROR_CODE = 400;
@NamespaceAccessible
public static final Integer HTTP_ERROR_CODE = 400;

@namespaceAccessible
public final static String HTTP_SERVER_ERROR_CODE = '500';
@NamespaceAccessible
public final static String HTTP_SERVER_ERROR_CODE = '500';
}
17 changes: 17 additions & 0 deletions force-app/main/default/classes/CheckoutCaptureRequest.cls
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,23 @@ public with sharing class CheckoutCaptureRequest implements CheckoutModification
this.lineItems = lineItems;
}

/**
* Application info
* @return applicationInfo
*/
@namespaceAccessible
public ApplicationInfo applicationInfo { get; set; }

@namespaceAccessible
public ApplicationInfo getApplicationInfo() {
return applicationInfo;
}

@namespaceAccessible
public void setApplicationInfo(ApplicationInfo applicationInfo) {
this.applicationInfo = applicationInfo;
}

@NamespaceAccessible
public CheckoutCaptureRequest(){}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@ public class CheckoutCaptureRequestTest {

testCaptureRequest.setLineItems(new List<LineItem>{new LineItem()});
System.assertEquals(1, testCaptureRequest.getLineItems().size());

testCaptureRequest.setApplicationInfo(ApplicationInfo.getExample());
System.assertEquals(testCaptureRequest.getApplicationInfo().adyenLibrary.name, '');


}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ public interface CheckoutModificationRequest {

List<LineItem> getLineItems();
void setLineItems(List<LineItem> lineItems);

ApplicationInfo getApplicationInfo();
void setApplicationInfo(ApplicationInfo applicationInfo);

}
17 changes: 17 additions & 0 deletions force-app/main/default/classes/CheckoutRefundRequest.cls
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,23 @@ public with sharing class CheckoutRefundRequest implements CheckoutModificationR
this.lineItems = lineItems;
}

/**
* Application info
* @return applicationInfo
*/
@namespaceAccessible
public ApplicationInfo applicationInfo { get; set; }

@namespaceAccessible
public ApplicationInfo getApplicationInfo() {
return applicationInfo;
}

@namespaceAccessible
public void setApplicationInfo(ApplicationInfo applicationInfo) {
this.applicationInfo = applicationInfo;
}

@NamespaceAccessible
public CheckoutRefundRequest(){}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@ public class CheckoutRefundRequestTest {

testRefundRequest.setLineItems(new List<LineItem>{new LineItem()});
System.assertEquals(1, testRefundRequest.getLineItems().size());

testRefundRequest.setApplicationInfo(ApplicationInfo.getExample());
System.assertEquals(testRefundRequest.getApplicationInfo().adyenLibrary.name, '');

}
}
26 changes: 15 additions & 11 deletions force-app/main/default/classes/NotificationRequestItem.cls
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
/*
* Represents an Adyen Webhook Notification Request Item
*/
@namespaceAccessible

@NamespaceAccessible
public with sharing class NotificationRequestItem {

@namespaceAccessible
@NamespaceAccessible
public Amount amount {get;set;}

@namespaceAccessible
@NamespaceAccessible
public String eventCode {get;set;}

@namespaceAccessible
@NamespaceAccessible
public String eventDate {get;set;}

@namespaceAccessible
@NamespaceAccessible
public String merchantAccountCode {get;set;}

@namespaceAccessible
@NamespaceAccessible
public String paymentMethod {get;set;}

@namespaceAccessible
@NamespaceAccessible
public String originalReference {get;set;}

@namespaceAccessible
@NamespaceAccessible
public String paymentPspReference {get;set;}

@namespaceAccessible
@NamespaceAccessible
public String pspReference {get;set;}

@namespaceAccessible
@NamespaceAccessible
public String reason {get;set;}

@namespaceAccessible
@NamespaceAccessible
public String success {get;set;}

@NamespaceAccessible
public Map<String,String> additionalData {get;set;}

}
13 changes: 11 additions & 2 deletions force-app/main/default/classes/PaymentMethodsRequest.cls
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ public with sharing class PaymentMethodsRequest {
@namespaceAccessible
public String shopperReference { get; set; }

/**
* List of payments methods to be not presented to the shopper. To refer to payment methods, use their `paymentMethod.type` from [Payment methods overview](https://docs.adyen.com/payment-methods).\n\nExample: `"blockedPaymentMethods":["ideal","giropay"]`
* @return blockedPaymentMethods
*/
@namespaceAccessible
public List<String> blockedPaymentMethods {get;set;}

@namespaceAccessible
public PaymentMethodsRequest() {
allowedPaymentMethods = new List<String>();
Expand All @@ -68,6 +75,7 @@ public with sharing class PaymentMethodsRequest {
paymentMethodsRequest.merchantAccount = '';
paymentMethodsRequest.shopperLocale = '';
paymentMethodsRequest.shopperReference = '';
paymentMethodsRequest.blockedPaymentMethods = new List<String>{''};
return paymentMethodsRequest;
}

Expand All @@ -80,7 +88,8 @@ public with sharing class PaymentMethodsRequest {
&& this.countryCode == paymentMethodsRequest.countryCode
&& this.merchantAccount == paymentMethodsRequest.merchantAccount
&& this.shopperLocale == paymentMethodsRequest.shopperLocale
&& this.shopperReference == paymentMethodsRequest.shopperReference;
&& this.shopperReference == paymentMethodsRequest.shopperReference
&& this.blockedPaymentMethods == paymentMethodsRequest.blockedPaymentMethods;
}
return false;
}
Expand All @@ -96,4 +105,4 @@ public with sharing class PaymentMethodsRequest {
hashCode = (17 * hashCode) + (shopperReference == null ? 0 : System.hashCode(shopperReference));
return hashCode;
}
}
}
43 changes: 22 additions & 21 deletions sfdx-project.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
{
"packageDirectories": [
{
"path": "force-app",
"default": true,
"package": "API Library Apex Adyen",
"versionName": "ver 0.1",
"versionNumber": "0.1.0.NEXT",
"ancestorVersion": "HIGHEST"
}
],
"name": "adyen-apex-api-lib-2GP",
"namespace": "adyen_payment",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "53.0",
"packageAliases": {
"API Library Apex Adyen": "0Ho4T0000000043SAA",
"API Library Apex Adyen@0.1.0-1": "04t4T000001VvbqQAC",
"API Library Apex Adyen@1.0.0-0": "04t4T000001VvfJQAS",
"API Library Apex Adyen@2.0.0-0": "04t4T000001HohPQAS",
"API Library Apex Adyen@3.0.0-0": "04t4T000001y7BWQAY"
{
"packageDirectories": [
{
"path": "force-app",
"default": true,
"package": "API Library Apex Adyen",
"versionName": "ver 3.0",
"versionNumber": "3.0.1.NEXT",
"ancestorVersion": "HIGHEST"
}
],
"name": "adyen-apex-api-lib-2GP",
"namespace": "adyen_payment",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "59.0",
"packageAliases": {
"API Library Apex Adyen": "0Ho4T0000000043SAA",
"API Library Apex Adyen@0.1.0-1": "04t4T000001VvbqQAC",
"API Library Apex Adyen@1.0.0-0": "04t4T000001VvfJQAS",
"API Library Apex Adyen@2.0.0-0": "04t4T000001HohPQAS",
"API Library Apex Adyen@3.0.0-0": "04t4T000001y7BWQAY",
"API Library Apex Adyen@3.0.1-1": "04tRP0000000A5pYAE"
}
}