Skip to content

Instantly share code, notes, and snippets.

View mrezentes's full-sized avatar

Miki Rezentes mrezentes

  • Mode
  • Durham, NC
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mrezentes on github.
  • I am mikirez (https://keybase.io/mikirez) on keybase.
  • I have a public key ASAcazptVc0ALV_6yutZqp9Zp1fIPZe4BGpUm284H23pNQo

To claim this, I am signing this object:

@mrezentes
mrezentes / MapMaker.md
Last active March 1, 2024 12:35
Convert a nested struct to a map

Problem: Convert nested structs or nested encoded maps into a decoded map and remove keys with nil values.

Solution: Walk the structure and convert all structures to decoded map.

Before (nested struct):

%TopLevelStuct{
      _type: "Purchase",
      account_key: "ZBmrcY7sv47nCaZOx5TXBTJuazy"
@mrezentes
mrezentes / xmldsig.md
Last active February 14, 2017 21:56
XML Signature Syntax and Processing

Spreedly uses the xmldsig library to perform the signing. To properly sign an xml request, enclose the entire xml request to be signed in xml_dsig template tags.

Nodes that should not be changed.

Do not modify the <wsse:Security> node. It must be formatted as given. This binary security token node will be generated on the server along with the timestamp.

Attributes that should not be changed.

Changes to the wsu:Id attribute of any node will cause signature failures.

@mrezentes
mrezentes / header_test.md
Last active September 2, 2016 00:16
Testing headers

Conclusion: The request from Spreedly contains the proper header: CONTENT_TYPE = text/xml;charset=utf-8

Spreedly header functionality has been tested as follows:

Create a receiver that uses http:/posttestserver.com.

  curl https://core.spreedly.com/v1/receivers.xml \
  -u 'Your credentials here' \
  -H 'Content-Type: application/xml' \
@mrezentes
mrezentes / text_configuration.md
Last active August 23, 2016 19:53
Customize text in Express

Label and button text can be configured through the data attributes of the express script element (id='express-script').

Express has always supported configuration of these modal fields (current documentation):

data-amount
data-full-name
data-company-name
data-sidebar-top-description
data-sidebar-bottom-description
@mrezentes
mrezentes / SFTP-batch-export.md
Last active July 11, 2016 14:45
SFTP Batch Export

Export multiple payment methods in a single, asynchronous, batch call to an SFTP receiver endpoint.

To use export:

  • create a receiver with an SFTP endpoint. Please refer to our documentation for creating receivers.
  • send a request to the export endpoint. Please refer to our documentation for export

Sample export request

@mrezentes
mrezentes / Iframe-Recache.md
Last active August 17, 2016 13:33
Spreedly iFrame now supports recache

Spreedly iFrame now supports the ability to recache a cvv (verification value). The only required piece of information is the payment method's token. The API calls to use this new functionality can be found below. Recache functionality is supported in version v1 of the iFrame library.

Configuring the iFrame for recache allows card holders to update their CVV with minimal PCI scope.

Recache API documentation

Spreedly functions:

Spreedly.recache() - causes the iframe to recache the cvv of the provided payment method token.