Barclaycard Smartpay Gateway Guide

Adding

To add a Barclaycard Smartpay gateway:


curl https://core.spreedly.com/v1/gateways.xml \
  -u 'Ll6fAtoVSTyVMlJEmtpoJV8S:RKOCG5D8D3fZxDSg504D0IxU2XD4Io5VXmyzdCtTivHFTTSy' \
  -H 'Content-Type: application/xml' \
  -d '<gateway>
        <gateway_type>barclaycard_smartpay</gateway_type>
        <company>Your company</company>
        <merchant>Your merchant name</merchant>
        <password>Your password</password>
      </gateway>'

<gateway>
  <token>T6vUOpUe7pbzfel1IcR1rMk9Uni</token>
  <gateway_type>barclaycard_smartpay</gateway_type>
  <name>Barclaycard Smartpay</name>
  <description nil="true"/>
  <company>Your company</company>
  <merchant>Your merchant name</merchant>
  <characteristics>
    <supports_purchase type="boolean">true</supports_purchase>
    <supports_authorize type="boolean">true</supports_authorize>
    <supports_capture type="boolean">true</supports_capture>
    <supports_credit type="boolean">true</supports_credit>
    <supports_general_credit type="boolean">false</supports_general_credit>
    <supports_void type="boolean">true</supports_void>
    <supports_verify type="boolean">true</supports_verify>
    <supports_reference_purchase type="boolean">false</supports_reference_purchase>
    <supports_purchase_via_preauthorization type="boolean">false</supports_purchase_via_preauthorization>
    <supports_offsite_purchase type="boolean">false</supports_offsite_purchase>
    <supports_offsite_authorize type="boolean">false</supports_offsite_authorize>
    <supports_3dsecure_purchase type="boolean">false</supports_3dsecure_purchase>
    <supports_3dsecure_authorize type="boolean">false</supports_3dsecure_authorize>
    <supports_store type="boolean">true</supports_store>
    <supports_remove type="boolean">false</supports_remove>
    <supports_fraud_review type="boolean">false</supports_fraud_review>
    <supports_disburse type="boolean">false</supports_disburse>
  </characteristics>
  <credentials>
    <credential>
      <name>company</name>
      <value>Your company</value>
    </credential>
    <credential>
      <name>merchant</name>
      <value>Your merchant name</value>
    </credential>
  </credentials>
  <gateway_specific_fields>
  </gateway_specific_fields>
  <payment_methods>
    <payment_method>credit_card</payment_method>
  </payment_methods>
  <state>retained</state>
  <redacted type="boolean">false</redacted>
  <created_at type="dateTime">2016-08-11T17:14:00Z</created_at>
  <updated_at type="dateTime">2016-08-11T17:14:00Z</updated_at>
</gateway>


env = Spreedly::Environment.new('Ll6fAtoVSTyMlJEm', 'RKcG5D8D3fZxDSg504U2XD4Io5VXz')
env.add_gateway(:barclaycard_smartpay, company: "Your company", merchant: "Your merchant name", password: "Your password")


#<Spreedly::Gateway:0x007fa992b224b8
 @created_at="2016-08-11T17:14:01Z",
 @credentials={"company"=>"Your company", "merchant"=>"Your merchant name"},
 @gateway_type="barclaycard_smartpay",
 @name="Barclaycard Smartpay",
 @state="retained",
 @token="XI5Eoo0iLOFseT0hpCerKUgNBGz",
 @updated_at="2016-08-11T17:14:01Z">

Gateway specific response fields

A response from Barclaycard Smartpay gateway may contain an auth_code field which you can find in the gateway_specific_response_fields. For example, a transaction could have something like this:

<transaction>
  <token>LgpTNGjsWQs9DwdxcbreUVz0R8p</token>
  <transaction_type>Purchase</transaction_type>
  <gateway_specific_response_fields>
     <barclaycard_smartpay>
       <auth_code>IJK2DZ</auth_code>
       <refusal_reason>Declined</refusal_reason>
       <refusal_reason_raw>Raw reason</refusal_reason_raw>
     </barclaycard_smartpay>
  </gateway_specific_response_fields>
</transaction>

If you’d like to request any gateway_specific_fields or gateway_specific_response_fields, please email support@spreedly.com with your request and the gateway documentation for the fields of interest.