Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
xcommerce-gists / setup.php
Last active August 29, 2015 13:56
Temporary Magento gist
/**
* Process integration resource permissions after the integration is created
*
* @param string[] $integrationNames Name of integrations passed as array from the invocation chain
* @return string[]
*/
public function afterInitIntegrationProcessing($integrationNames)
@xcommerce-gists
xcommerce-gists / setup.php
Created February 25, 2014 15:19
Temporary Magento gist
/**
* Initiate integration processing
*
* @param array $integrationNames
* @return array of integration names sent to the next invocation
*/
public function initIntegrationProcessing(array $integrationNames)
@xcommerce-gists
xcommerce-gists / config.xml
Last active August 29, 2015 13:56
Temporary Magento gist
<integrations>
<integration name="testIntegrationModule1">
<email>test-integration1@magento.com</email>
<endpoint_url></endpoint_url>
</integration>
<integration name="testIntegrationModule2">
<email>test-integration2@magento.com</email>
<endpoint_url></endpoint_url>
</integration>
</integrations>
@xcommerce-gists
xcommerce-gists / di.xml
Created February 25, 2014 15:18
Temporary Magento gist
<type name="Magento\Module\Updater\SetupFactory">
<arguments>
<argument name="resourceTypes" xsi:type="array">
<item name="testmodule1_setup" xsi:type="string">Magento\Integration\Model\Resource\Setup</item>
</argument>
</arguments>
</type>
@xcommerce-gists
xcommerce-gists / api.xml
Last active August 29, 2015 13:56
Temporary Magento gist
<integrations>
<integration name="testIntegrationModule1">
<!-- List of API resources required by the integration. These are resource ids defined
in etc/acl.xml of modules and subsequently mapped to web APIs in webapi.xml. -->
<resources>
<resource name="Magento_Reward::reward_spend" />
<resource name="Magento_Customer::online" />
<!-- Undefined resources will not be created-->
<resource name="Magento_Customer::undefined" />
<resource name="Magento_Sales::reorder" />
@xcommerce-gists
xcommerce-gists / webapi.xml
Last active August 29, 2015 13:56
Temporary Magento gist
<?xml version="1.0"?>
<!--
/**
* {license_notice}
*
* @copyright {copyright}
* @license {license_link}
*/
-->
<config>
@xcommerce-gists
xcommerce-gists / error.json
Created February 26, 2014 22:49
Temporary Magento gist
error: {
code: 3100,
message: Invalid Quantity,
parameters: [product, email]
}
@xcommerce-gists
xcommerce-gists / soap-error.xml
Created February 26, 2014 22:48
Temporary Magento gist
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:m="http://magento.com">
<env:Body>
<env:Fault>
<env:Code>
<env:Value>env:Sender</env:Value>
</env:Code>
<env:Reason>
<env:Text xml:lang="en">Invalid Quantity</env:Text>
@xcommerce-gists
xcommerce-gists / doEC-one-time-simple-payment.php
Created April 17, 2012 08:05
Single Payment with PayPal Express Checkout API
require_once('services/PayPalApi/PayPalAPIInterfaceServiceService.php');
/* setup payment details */
orderTotal = new BasicAmountType( '-your-currency-code-', '-your-amount-');
$PaymentDetails= new PaymentDetailsType();
$PaymentDetails->OrderTotal = $orderTotal;
/* create DoExpressCheckout request details */
$DoECRequestDetails = new DoExpressCheckoutPaymentRequestDetailsType();
$DoECRequestDetails->PayerID = '-payer-id-from-get-EC-call;
@xcommerce-gists
xcommerce-gists / paypal-access-oauth2-python-sample-app.yaml
Created April 17, 2012 18:48
Python OAuth 2 Implementation for PayPal Access
application: oauth2-paypal
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: index.py