anchor.diff:  
   ** *gatewayError* - Set to `null` since there is no error.
   
  -** *gatewayErrorCode* - set to `null` since there is no error.
  +** *gatewayErrorCode* - Set to `null` since there is no error.
   
   ** *firstPaymentReferenceId* - Set to the *payment Id* returned by GoCardless.
   
  
positive.code: 
  * The servlet is mapped to the `/checkout` path. Thus, a client application needs to make a request to this path to invoke the servlet.
  
  * The `createSession` accepts properties corresponding to `clock` and `goCardlessPaymentPluginApi`. These are injected via the `GoCardlessActivator` class (This class is explained in the <<gocardless_activator, "GoCardlessActivator">> section below).  
  
  * It then creates `PluginProperty` objects corresponding to the values passed in as parameters.
  
  
negative.code: }
  ----
  
  * If you recall, `addPaymentMethod` stores the *mandate id* in the Kill Bill database. This is first retrieved and assigned to `mandate`.
  
  * Next, the `idempotencyKey` is retrieved from the `properties` passed in. The  `idempotencyKey` is a GoCardless specific value. As per the GoCardless documentation, their API will ensure this payment is only ever created once per `idempotencyKey`. So a client application could specify `kbPaymentId` as the `idempotencyKey` to ensure at most a single payment is created per `kbPaymentId`.
  
  *  The `currency` object passed in is of type `org.killbill.billing.catalog.api.Currency`. This is then converted to a *GoCardless Currency object* (of type `com.gocardless.services.PaymentService.PaymentCreateRequest.Currency`). Most payment plugins have code similar to this to convert Kill Bill objects to compatible objects in the plugin's client library.
  
  * Finally, the `client.payments().create()` is invoked with the `idempotencyKey`, `amount` and `currency` values. This returns a `Payment` object which contains a `paymentId`. Additionally, the `kbPaymentId` and `kbTransactionId` are sent as *metadata* to GoCardless in this call. GoCardless *metadata* allows an application to send custom key value pairs to GoCardless. These can then be retrieved later on as required. In our case, `kbPaymentId` and `kbTransactionId` are required to retrieve the payment information as explained in the <<getPaymentInfo, `getPaymentInfo`>> section.  
  
  * The `purchasePayment` method returns a `PaymentTransactionInfoPlugin` object.  We have already created a <<GoCardlessPaymentTransactionInfoPlugin, `GoCardlessPaymentTransactionInfoPlugin`>> class above.
  
  * If the payment is successful, the `GoCardlessPaymentTransactionInfoPlugin` object is created with the following values:
  
  