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/3.0.0 #42

Merged
merged 23 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f9567ae
feat: pr template update (#24)
amihajlovski Feb 26, 2024
2d2bb14
Implementing Unit Test automation (#32)
dcardos May 24, 2024
f36f34d
feat: updating code owners (#31)
dcardos May 24, 2024
3178f69
Bug fix: making sure capture reference is unique (#33)
dcardos Jun 10, 2024
7f9a874
Log capture_failed notification web hook using standard payment gatew…
dcardos Jun 14, 2024
cbead9f
fix: removing deprecated paymentPspReference attribute (#36)
dcardos Jun 18, 2024
91033a9
Remove hardcoded namespace in the code (#35)
dcardos Jun 24, 2024
824928a
Logging errors in gateway logs response field (#37)
dcardos Jun 24, 2024
ba6fdf3
Minor custom metadata layout improvement and code owners update (#38)
dcardos Jun 26, 2024
683040a
Webhook HMAC Key validation (#39)
dcardos Jul 11, 2024
0ba43b0
Implementing new named credential for Adyen Checkout API Callouts (#40)
dcardos Jul 17, 2024
6831105
Improvements: automating manual steps and removing deprecated adyenOv…
dcardos Jul 23, 2024
64225f0
feat: release 3.0.0
daniloc-adyen Jul 25, 2024
9309c9c
task: changing names to avoid conflict (#43)
dcardos Jul 30, 2024
bcf4f63
feat: release 3.0.0
daniloc-adyen Jul 25, 2024
598a2d9
Merge remote-tracking branch 'origin/Release/3.0.0' into Release/3.0.0
daniloc-adyen Jul 30, 2024
7018706
task: new build with new gateway provider name and gateway class
daniloc-adyen Jul 30, 2024
cfc7ec5
fix: package incompatibility with new order save behavior (#45)
dcardos Jul 31, 2024
fbe0f64
Removing duplicated code (#44)
dcardos Jul 31, 2024
390d2b8
feat: release 3.0.0
daniloc-adyen Jul 25, 2024
b10307c
task: new build with new gateway provider name and gateway class
daniloc-adyen Jul 30, 2024
d96c0e0
Merge remote-tracking branch 'origin/Release/3.0.0' into Release/3.0.0
daniloc-adyen Jul 31, 2024
3beebf0
feat: final build release
daniloc-adyen Aug 1, 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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @maassenbas @amihajlovski @shubhamvijaivargiya @dcardos
* @amihajlovski @dcardos @shanikantsingh @shubhamvijaivargiya @zenit2001 @shubhamk67
10 changes: 6 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<!-- 🎉 Thank you for submitting a pull request! 🎉 -->

## Summary
<!--
Describe the changes proposed in this pull request:
- What is the motivation for this change?
- What is the motivation for this change?
- What existing problem does this pull request solve?
-->

**Fixed issue**: <!-- #-prefixed issue number -->

## Tested scenarios
Description of tested scenarios:

**Fixed issue**: <!-- #-prefixed issue number -->
60 changes: 60 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Salesforce CI/CD

on:
pull_request:
branches:
- '**'
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest

env:
PBO_AUTH_URL: ${{ secrets.PBO_AUTH_URL }}

steps:
- name: Checkout This Repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install Salesforce CLI
run: npm install @salesforce/cli --global

- name: Create authentication file from secret
run: echo ${PBO_AUTH_URL} > secret.json

- name: Authenticate to Dev Hub
run: sf org login sfdx-url -f secret.json --set-default-dev-hub

- name: Create Scratch Org
run: sf org create scratch -f config/project-scratch-def.json --set-default --alias ScratchOrg -y 1

- name: Checkout Apex-Library Repository
uses: actions/checkout@v4
with:
repository: Adyen/adyen-apex-api-library
ref: develop
path: dependency-repo

- name: Push Apex Lib Source to Scratch Org
run: |
cd dependency-repo
sf project deploy start --target-org ScratchOrg

- name: Checkout This Repository Back
uses: actions/checkout@v4

- name: Deploy This Repository Code
run: sf project deploy start --target-org ScratchOrg --ignore-conflicts

- name: Run Apex tests
run: sf apex run test --target-org ScratchOrg --code-coverage --synchronous

- name: Delete Scratch Org
if: always()
run: sf org delete scratch --target-org ScratchOrg --no-prompt
2 changes: 1 addition & 1 deletion config/project-scratch-def.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"orgName": "Adyen_OMS",
"edition": "Developer",
"features": ["EnableSetPasswordInApi", "OrderManagement", "MultiCurrency"],
"features": ["EnableSetPasswordInApi", "OrderManagement", "MultiCurrency", "OrderSaveBehaviorBoth"],
"settings": {
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
Expand Down
58 changes: 26 additions & 32 deletions force-app/main/default/classes/AdyenAsyncAdapter.cls
Original file line number Diff line number Diff line change
@@ -1,46 +1,40 @@
/**
* This adapter is called by the Payment Gateway.
* The http calls are delegated to the AdyenPaymentHelper Class.
*
* This will process a CAPTURE and a REFUND Request as well as the corresponding Async callbacks.
*
* @see AdyenPaymentHelper
* @see AdyenClient
* @see https://quip.com/z6RVAJzUKYaf
* This class is being deprecated after v2 due to the introduction of the payment gateway provider metadata.
* This way when upgrading the package conflicts will be avoided.
* The new one should be AdyenGatewayAdapter.
*/
global with sharing class AdyenAsyncAdapter implements CommercePayments.PaymentGatewayAdapter,
CommercePayments.PaymentGatewayAsyncAdapter {
CommercePayments.PaymentGatewayAsyncAdapter {


global AdyenAsyncAdapter() {}

/**
* The entry point for processing payment requests. Returns the response from the payment gateway.
* Accepts the gateway context request and handover the operation to AdyenPaymentHelper to call the appropriate capture or refund operation.
*
* @param paymentGatewayContext
* @return CommercePayments.GatewayResponse
*
* @implNotes
* [CAPTURE] is called after setting Fulfillment.Status to 'Fulfilled' which in turns fires processes
* and flows to create invoices which ultimately fires this.
*
* [REFUND] is called by using the action on the order summary page (left hand side).
*
*/
global CommercePayments.GatewayResponse processRequest(CommercePayments.paymentGatewayContext paymentGatewayContext) {
/**
* The entry point for processing payment requests. Returns the response from the payment gateway.
* Accepts the gateway context request and handover the operation to AdyenPaymentHelper to call the appropriate capture or refund operation.
*
* @param paymentGatewayContext from SF
* @return CommercePayments.GatewayResponse
*
* @implNotes
* [CAPTURE] is called after setting Fulfillment.Status to 'Fulfilled' which in turns fires processes
* and flows to create invoices which ultimately fires this.
*
* [REFUND] is called by using the action on the order summary page (left hand side).
*
*/
global CommercePayments.GatewayResponse processRequest(CommercePayments.PaymentGatewayContext paymentGatewayContext) {
return AdyenPaymentHelper.handleFulfillmentOrderStatusChange(paymentGatewayContext);
}

/**
* Listens to the incoming async notification callback from Adyen and handover to AdyenPaymentHelper for processing
*
* @param gatewayNotificationContext
* @return CommercePayments.GatewayNotificationResponse
*/
/**
* Listens to the incoming async notification callback from Adyen and handover to AdyenPaymentHelper for processing
*
* @param gatewayNotificationContext from SF
* @return CommercePayments.GatewayNotificationResponse
*/
public CommercePayments.GatewayNotificationResponse processNotification(CommercePayments.PaymentGatewayNotificationContext gatewayNotificationContext) {
String apexName = String.valueOf(this).substring(0, String.valueOf(this).indexOf(':'));
return AdyenPaymentHelper.handleAsyncNotificationCallback(gatewayNotificationContext, apexName);
return AdyenPaymentHelper.handleAsyncNotificationCallback(gatewayNotificationContext);
}

public class GatewayException extends Exception {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>51.0</apiVersion>
<apiVersion>60.0</apiVersion>
<status>Active</status>
</ApexClass>
152 changes: 0 additions & 152 deletions force-app/main/default/classes/AdyenAsyncAdapterTest.cls

This file was deleted.

Loading