Skip to content

Commit

Permalink
Merge 8632f24 into feature/242__gateway-assignment-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
salesforce-org-metaci[bot] authored Nov 14, 2022
2 parents bc8016f + 8632f24 commit 5901b69
Show file tree
Hide file tree
Showing 28 changed files with 775 additions and 235 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ robot/Cumulus/results/
datasets/dev_org/test_data.db
*.db
.cci

.sfdx
.sf
# LWC
force-app/main/default/lwc/.eslintrc.json
/node_modules
Expand Down
4 changes: 3 additions & 1 deletion force-app/main/default/classes/ElevateBatchItem.cls
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public with sharing class ElevateBatchItem {
@AuraEnabled public String elevateBatchId {get; set;}
@AuraEnabled public String declineReason {get; set;}
@AuraEnabled public String cardLast4 {get; set;}
@AuraEnabled public String achLast4 {get; set;}
@AuraEnabled public String cardNetwork {get; set;}
@AuraEnabled public String cardExpirationMonth {get; set;}
@AuraEnabled public String cardExpirationYear {get; set;}
Expand All @@ -59,7 +60,8 @@ public with sharing class ElevateBatchItem {
this.elevateBatchId = createBatchItemResponse.elevateBatchId();
this.originalTransactionId = createBatchItemResponse.originalTransactionId();
this.declineReason = createBatchItemResponse.declineReason();
this.cardLast4 = createBatchItemResponse.last4();
this.cardLast4 = createBatchItemResponse.cardLast4();
this.achLast4 = createBatchItemResponse.achLast4();
this.status = createBatchItemResponse.status();
this.statusReason = createBatchItemResponse.statusReason();
this.cardNetwork = createBatchItemResponse.brand();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,14 @@ public class ElevateBatchItemCreateResponse {
return purchaseResponse?.authExpiresAt;
}

public String last4() {
public String cardLast4() {
return commitmentResponse != null ? commitmentResponse.cardData?.last4 : purchaseResponse.cardData?.last4;
}

public String achLast4() {
return commitmentResponse != null ? commitmentResponse.achData?.last4 : purchaseResponse.achData?.last4;
}

public String brand() {
return commitmentResponse != null ? commitmentResponse.cardData?.brand : purchaseResponse.cardData?.brand;
}
Expand Down
15 changes: 7 additions & 8 deletions force-app/main/default/labels/CustomLabels.labels-meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5844,6 +5844,13 @@ To check your GAU Allocation settings, go to Donations | GAU Allocations.</value
<shortDescription>Button to process a batch and payments through {0}</shortDescription>
<value>Process Batch &amp; Payments</value>
</labels>
<labels>
<fullName>bgeEditPaymentInformation</fullName>
<language>en_US</language>
<protected>true</protected>
<shortDescription>Warns users to re-enter payment information when editing Elevate-connected gifts</shortDescription>
<value>You can&apos;t edit this Elevate-connected gift until you re-enter the payment information. Select Edit Payment Information.</value>
</labels>
<labels>
<fullName>bgeRetirementWarningBody</fullName>
<categories>Batch Data Entry</categories>
Expand Down Expand Up @@ -9810,14 +9817,6 @@ If preferred, you can disable Gift Entry and instead use older Batch Gift Entry
<shortDescription>Warning about processing batch when authorizations have expired</shortDescription>
<value>One or more card authorizations expired. To ensure these payments are charged when processing the batch, reenter the payment information for donations with an Elevate Payment Status of Expired Authorization.</value>
</labels>
<labels>
<fullName>gePaymentProcessedWarning</fullName>
<categories>Gift Entry</categories>
<language>en_US</language>
<protected>true</protected>
<shortDescription>Warning about editing fields when transaction already processed</shortDescription>
<value>{0} successfully processed the payment. Changing the donor, date, amount, or payment method will result in inconsistent records for the same transaction in {0} and NPSP.</value>
</labels>
<labels>
<fullName>gePaymentProcessError</fullName>
<categories>Gift Entry</categories>
Expand Down
7 changes: 5 additions & 2 deletions force-app/main/default/lwc/geConstants/geConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ const CLICKED_DOWN = 'clicked-down';
const DOWN = 'down';
const UP = 'up';

const DEFAULT_NAME_ON_CARD = '[Not Provided]'
const DEFAULT_NAME_ON_CARD = '[Not Provided]';

const RECURRING_TYPE_FIXED = 'Fixed';

export {
COMMITMENT_INACTIVE_STATUS,
Expand All @@ -77,5 +79,6 @@ export {
CLICKED_DOWN,
DOWN,
UP,
DEFAULT_NAME_ON_CARD
DEFAULT_NAME_ON_CARD,
RECURRING_TYPE_FIXED
};
8 changes: 2 additions & 6 deletions force-app/main/default/lwc/geElevateBatch/geElevateBatch.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import apexAddToElevateBatch from '@salesforce/apex/GE_GiftEntryController.addToElevateBatch';
import apexCreateElevateBatch from '@salesforce/apex/GE_GiftEntryController.createElevateBatch';
import apexRemoveFromElevateBatch from '@salesforce/apex/GE_GiftEntryController.removeFromElevateBatch';
import PAYMENT_ELEVATE_ID from '@salesforce/schema/DataImport__c.Payment_Elevate_ID__c';
import RECURRING_DONATION_ID from '@salesforce/schema/DataImport__c.Recurring_Donation_Elevate_Recurring_ID__c';
import PAYMENT_ELEVATE_ELEVATE_BATCH_ID from '@salesforce/schema/DataImport__c.Payment_Elevate_Batch_Id__c';
import GeGatewaySettings from 'c/geGatewaySettings';

class ElevateBatch {

Expand Down Expand Up @@ -43,9 +40,8 @@ class ElevateBatch {
async remove(batchItem) {
return await apexRemoveFromElevateBatch({
batchItem: {
elevateBatchId: batchItem[PAYMENT_ELEVATE_ELEVATE_BATCH_ID.fieldApiName],
id: batchItem[PAYMENT_ELEVATE_ID.fieldApiName] ? batchItem[PAYMENT_ELEVATE_ID.fieldApiName] :
batchItem[RECURRING_DONATION_ID.fieldApiName]
elevateBatchId: batchItem.getFieldValue(PAYMENT_ELEVATE_ELEVATE_BATCH_ID.fieldApiName),
id: batchItem.idToRemove()
}
});
}
Expand Down
Loading

0 comments on commit 5901b69

Please sign in to comment.