-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Adyen/develop
Adyen Payments for B2B Commerce Lightning - Release Version 1.1.0.0
- Loading branch information
Showing
40 changed files
with
1,812 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# adyen-salesforce-b2b-lightning | ||
Adyen payments package to work with Salesforce B2B Commerce Lightning product. | ||
|
||
Adyen payments package to work with Salesforce B2B Commerce Lightning product. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<types> | ||
<members>adyensompackage__AdyenAsyncAdapter</members> | ||
<members>adyensompackage__AdyenAsyncAdapterTest</members> | ||
<members>adyensompackage__AdyenPaymentHelper</members> | ||
<members>adyensompackage__AdyenService</members> | ||
<members>adyensompackage__AdyenPaymentUtility</members> | ||
<name>ApexClass</name> | ||
</types> | ||
<types> | ||
<members>*</members> | ||
<name>CustomMetadata</name> | ||
</types> | ||
<types> | ||
<members>adyensompackage__Adyen_Adapter_mdt</members> | ||
<name>CustomObject</name> | ||
</types> | ||
<types> | ||
<members>*</members> | ||
<name>CustomSite</name> | ||
</types> | ||
<types> | ||
<members>*</members> | ||
<name>NamedCredential</name> | ||
</types> | ||
<version>52.0</version> | ||
</Package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="WEB_MODULE" version="4"> | ||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$" /> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
</component> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"orgName": "Adyen", | ||
"edition": "Developer", | ||
"features": ["MultiCurrency","Communities", "B2BCommerce", "EnableSetPasswordInApi"], | ||
"settings": { | ||
"lightningExperienceSettings": { | ||
"enableS1DesktopEnabled": true | ||
}, | ||
"experienceBundleSettings": { | ||
"enableExperienceBundleMetadata": true | ||
}, | ||
"communitiesSettings": { | ||
"enableNetworksEnabled": true | ||
}, | ||
"orderSettings": { | ||
"enableOrders": true, | ||
"enableEnhancedCommerceOrders": true, | ||
"enableOptionalPricebook": true | ||
}, | ||
"commerceSettings": { | ||
"commerceEnabled": true | ||
}, | ||
"mobileSettings": { | ||
"enableS1EncryptedStoragePref2": false | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
adyen-appexchange/force-app/main/default/classes/AdyenAsyncAdapter.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* 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 AdyenService | ||
* @see https://quip.com/z6RVAJzUKYaf | ||
*/ | ||
global with sharing class AdyenAsyncAdapter implements CommercePayments.PaymentGatewayAdapter, | ||
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) { | ||
return AdyenPaymentHelper.handleFulfillmentOrderStatusChange(paymentGatewayContext); | ||
} | ||
|
||
/** | ||
* Listens to the incoming async notification callback from Adyen and handover to AdyenPaymentHelper for processing | ||
* | ||
* @param gatewayNotificationContext | ||
* @return CommercePayments.GatewayNotificationResponse | ||
*/ | ||
public CommercePayments.GatewayNotificationResponse processNotification(CommercePayments.PaymentGatewayNotificationContext gatewayNotificationContext) { | ||
String apexName = String.valueOf(this).substring(0, String.valueOf(this).indexOf(':')); | ||
return AdyenWebhookNotificationHelper.handleAsyncNotificationCallback(gatewayNotificationContext, apexName); | ||
} | ||
|
||
public class GatewayException extends Exception {} | ||
} |
5 changes: 5 additions & 0 deletions
5
adyen-appexchange/force-app/main/default/classes/AdyenAsyncAdapter.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>51.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
Oops, something went wrong.