Sie befinden sich hier:
Salesforce-Zahlungen für Austausche mit RMA
Wenn für einen Austausch zusätzliche Mittel erforderlich sind, verwenden Sie Salesforce-Zahlungen, um diese Mittel nahtlos aufzuladen und zu akzeptieren.
Erforderliche Editionen
| Unterstützte Editionen anzeigen. |
Salesforce-Zahlungen können mit Exchanges RMA mit B2C, B2B oder D2C Commerce verwendet werden.
Da Salesforce-Zahlungs-Gateways nicht automatisch als verfügbare Integrationen angezeigt werden, gibt es einen zusätzlichen Schritt für Exchanges RMA in B2B- und D2C-Shops, damit Salesforce-Zahlungen verwendet werden können.
Richten Sie auf der Seite "Zahlungen" einen alternativen Anbieter ein. Dieser alternative Anbieter muss ein durch "Salesforce-Zahlungen" erstelltes Kreditkarten-Gateway sein Führen Sie dieses Skript aus, um den "StoreIntegratedService" für Salesforce-Zahlungen zu konfigurieren. Verwenden Sie für das Zahlungs-Gateway Ihren eigenen Web-Store-Namen und den Händleraccountnamen.
// Script to add a connection between the webstore and the payment gateway for stores using
// Salesforce Payments (SFP) as the payment gateway for SFP does not show in the the Payment
// Alternate Integration.
String merchantAccountName = 'DemoTest';
String webStoreName = 'B2B Store';
// obtain webstoreid
List<WebStore> webstores = [SELECT Id, Name FROM WebStore WHERE Name = :webStoreName];
System.debug('Webstores: ' + webstores);
if(webstores.isEmpty()){
System.debug('Error obtaining webstore with name ' + webStoreName);
}
String webStoreId = webstores[0].Id;
System.debug('WebStoreId: ' + webStoreId);
// obtain merchant account
List<MerchAccPaymentMethodSet> merchAccPaymentMethodSet = [SELECT Id, MerchantAccountId, DeveloperName FROM MerchAccPaymentMethodSet WHERE MerchantAccount.Name = :merchantAccountName];
System.debug('Details: ' + merchAccPaymentMethodSet);
if(merchAccPaymentMethodSet.isEmpty()){
System.debug('Error obtaining MerchAccPaymentMethodSet with name ' + merchantAccountName);
}
String merchantAccountId = merchAccPaymentMethodSet[0].MerchantAccountId;
System.debug('merchantAccountId: ' + merchantAccountId);
// obtain payment gateway id from the merchant account
List<PaymentGateway> paymentGateways = [SELECT Id, PaymentGatewayName FROM PaymentGateway WHERE MerchantAccountId = :merchantAccountId];
System.debug('paymentGateways: ' + paymentGateways);
if(paymentGateways.isEmpty()){
System.debug('Error obtaining payment gateway with merchant account id ' + merchantAccountId);
}
String paymentGatewayId = paymentGateways[0].Id;
System.debug('paymentGatewayId: ' + paymentGatewayId);
// If a StoreIntegratedService already exists for Payment on the WebStore then update the Integration field with the paymentGatewayId
List<StoreIntegratedService> storeServices = [SELECT Id FROM StoreIntegratedService WHERE StoreId = :webStoreId AND ServiceProviderType ='Payment' ];
System.debug('storeServices: ' + storeServices);
if(storeServices.isEmpty()){
StoreIntegratedService storeService = new StoreIntegratedService(
StoreId = webStoreId,
Integration = paymentGatewayId,
ServiceProviderType ='Payment');
insert storeService;
} else {
StoreIntegratedService existingStoreService = storeServices[0];
existingStoreService.Integration = paymentGatewayId;
update existingStoreService;
}

