Loading
Salesforce Orderhantering
Innehållsförteckningar
Välj filter

          Inga resultat
          Inga resultat
          Här är några söktips

          Kontrollera stavningen av dina nyckelord.
          Använd mer allmänna söktermer.
          Välj färre filter för att utöka din sökning.

          Sök hela Salesforce-hjälpen
          Salesforce-betalningar för utbyten med RMA

          Salesforce-betalningar för utbyten med RMA

          Om ett utbyte kräver ytterligare resurser, använd Salesforce Payments för att debitera och acceptera dessa resurser sömlöst.

          Versioner som krävs

          Visa versioner som stöds.

          Salesforce Payments kan arbeta med Exchanges RMA med B2C, B2B eller D2C Commerce.

          Eftersom Salesforce Payment Gateways inte automatiskt visas som tillgängliga integreringar finns ett extra steg för Exchanges RMA i B2B- och D2C-butiker för att fungera med Salesforce Payments.

          Konfigurera en alternativ leverantör på sidan Betalningar. Denna alternativa leverantör måste vara en kreditkortsgateway som skapas av Salesforce Payments. För att konfigurera StoreIntegratedService för Salesforce-betalningar, kör detta skript. Använd ditt eget webbbutiksnamn och handelskontonamn för betalningsgateway.

          Exempel
          Exempel
          // 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;
          }
          
           
          Laddar
          Salesforce Help | Article