chippinpayments - Version 0.1.6

Version Notes

Make new order status configurable

Download this release

Release Info

Developer Toby Rhodes
Extension chippinpayments
Version 0.1.6
Comparing to
See all releases


Code changes from version 0.1.4 to 0.1.6

app/code/community/Chippin/ChippinPayment/Model/Config.php CHANGED
@@ -44,4 +44,9 @@ class Chippin_ChippinPayment_Model_Config {
44
  return Mage::getStoreConfig('payment/chippinpayment/redirect_message');
45
  }
46
 
 
 
 
 
 
47
  }
44
  return Mage::getStoreConfig('payment/chippinpayment/redirect_message');
45
  }
46
 
47
+ public function getNewOrderStatus()
48
+ {
49
+ return Mage::getStoreConfig('payment/chippinpayment/order_status');
50
+ }
51
+
52
  }
app/code/community/Chippin/ChippinPayment/Model/Payment/Method.php CHANGED
@@ -51,9 +51,11 @@ class Chippin_ChippinPayment_Model_Payment_Method extends Mage_Payment_Model_Met
51
  */
52
  public function initialize($paymentAction, $stateObject)
53
  {
54
- $state = Mage_Sales_Model_Order::STATE_NEW;
55
  $stateObject->setState($state);
56
- $stateObject->setStatus(Chippin_ChippinPayment_Model_Order::STATUS_NEW);
 
 
57
  $stateObject->setIsNotified(false);
58
 
59
  return $this;
51
  */
52
  public function initialize($paymentAction, $stateObject)
53
  {
54
+ $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
55
  $stateObject->setState($state);
56
+ $status = $this->getConfig()->getNewOrderStatus();
57
+ $status = $status? $status : Chippin_ChippinPayment_Model_Order::STATUS_NEW;
58
+ $stateObject->setStatus($status);
59
  $stateObject->setIsNotified(false);
60
 
61
  return $this;
app/code/community/Chippin/ChippinPayment/controllers/StandardController.php CHANGED
@@ -20,7 +20,7 @@ class Chippin_ChippinPayment_StandardController extends Mage_Core_Controller_Fro
20
  protected $_config = null;
21
 
22
  /**
23
- * When a customer chooses Paypal on Checkout/Payment page
24
  *
25
  */
26
  public function redirectAction()
20
  protected $_config = null;
21
 
22
  /**
23
+ * When a customer chooses Chippin on Checkout/Payment page
24
  *
25
  */
26
  public function redirectAction()
app/code/community/Chippin/ChippinPayment/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Chippin_ChippinPayment>
5
- <version>0.1.3</version>
6
  </Chippin_ChippinPayment>
7
  </modules>
8
  <frontend>
@@ -75,9 +75,9 @@
75
  <sandbox>1</sandbox>
76
  <sandbox_endpoint>https://chippin.co.uk/sandbox/new</sandbox_endpoint>
77
  <live_endpoint>https://chippin.co.uk/new</live_endpoint>
 
78
  <title>Pay by Chippin to share the cost with others</title>
79
  <description>You can share the cost of this purchase with others if you choose to pay by Chippin.</description>
80
- <redirect_message>You will be redirected to the Chippin website when you place the order.</redirect_message>
81
  <duration>48</duration>
82
  <grace_period>48</grace_period>
83
  </chippinpayment>
2
  <config>
3
  <modules>
4
  <Chippin_ChippinPayment>
5
+ <version>0.1.6</version>
6
  </Chippin_ChippinPayment>
7
  </modules>
8
  <frontend>
75
  <sandbox>1</sandbox>
76
  <sandbox_endpoint>https://chippin.co.uk/sandbox/new</sandbox_endpoint>
77
  <live_endpoint>https://chippin.co.uk/new</live_endpoint>
78
+ <order_status>chippin_new</order_status>
79
  <title>Pay by Chippin to share the cost with others</title>
80
  <description>You can share the cost of this purchase with others if you choose to pay by Chippin.</description>
 
81
  <duration>48</duration>
82
  <grace_period>48</grace_period>
83
  </chippinpayment>
app/code/community/Chippin/ChippinPayment/etc/system.xml CHANGED
@@ -32,7 +32,7 @@
32
  </merchant_id>
33
  <secret translate="label comment">
34
  <label>Secret</label>
35
- <frontend_type>password</frontend_type>
36
  <sort_order>30</sort_order>
37
  <show_in_default>1</show_in_default>
38
  <show_in_website>1</show_in_website>
@@ -68,15 +68,15 @@
68
  <show_in_store>0</show_in_store>
69
  <!-- <depends><sandbox>0</sandbox></depends> -->
70
  </live_endpoint>
71
- <!-- <order_status translate="label">
72
  <label>New Order Status</label>
73
  <frontend_type>select</frontend_type>
74
- <source_model>adminhtml/system_config_source_order_status_processing</source_model>
75
  <sort_order>70</sort_order>
76
  <show_in_default>1</show_in_default>
77
  <show_in_website>1</show_in_website>
78
  <show_in_store>0</show_in_store>
79
- </order_status> -->
80
  <sort_order translate="label">
81
  <label>Sort Order</label>
82
  <frontend_type>text</frontend_type>
@@ -102,15 +102,7 @@
102
  <show_in_website>1</show_in_website>
103
  <show_in_store>1</show_in_store>
104
  </description>
105
- <redirect_message translate="label">
106
- <label>Redirection message</label>
107
- <frontend_type>text</frontend_type>
108
- <sort_order>92</sort_order>
109
- <show_in_default>1</show_in_default>
110
- <show_in_website>1</show_in_website>
111
- <show_in_store>1</show_in_store>
112
- </redirect_message>
113
- <duration translate="label comment">
114
  <label>Duration (hours)</label>
115
  <frontend_type>text</frontend_type>
116
  <sort_order>100</sort_order>
32
  </merchant_id>
33
  <secret translate="label comment">
34
  <label>Secret</label>
35
+ <frontend_type>text</frontend_type>
36
  <sort_order>30</sort_order>
37
  <show_in_default>1</show_in_default>
38
  <show_in_website>1</show_in_website>
68
  <show_in_store>0</show_in_store>
69
  <!-- <depends><sandbox>0</sandbox></depends> -->
70
  </live_endpoint>
71
+ <order_status translate="label">
72
  <label>New Order Status</label>
73
  <frontend_type>select</frontend_type>
74
+ <source_model>adminhtml/system_config_source_order_status</source_model>
75
  <sort_order>70</sort_order>
76
  <show_in_default>1</show_in_default>
77
  <show_in_website>1</show_in_website>
78
  <show_in_store>0</show_in_store>
79
+ </order_status>
80
  <sort_order translate="label">
81
  <label>Sort Order</label>
82
  <frontend_type>text</frontend_type>
102
  <show_in_website>1</show_in_website>
103
  <show_in_store>1</show_in_store>
104
  </description>
105
+ <duration translate="label comment">
 
 
 
 
 
 
 
 
106
  <label>Duration (hours)</label>
107
  <frontend_type>text</frontend_type>
108
  <sort_order>100</sort_order>
app/design/frontend/base/default/template/chippinpayment/form/mark.phtml CHANGED
@@ -1,5 +1,3 @@
1
  <div>
2
- <p><?php echo $this->getDescription() ?></p>
3
- <p class="form-alt"><?php echo $this->getRedirectMessage() ?></p>
4
- <img class="v-middle" width="70" src="https://s3-eu-west-1.amazonaws.com/chippin-assets/chippin.png" alt="Chippin">
5
  </div>
1
  <div>
2
+ <p><img class="v-middle" width="70" src="https://s3-eu-west-1.amazonaws.com/chippin-assets/chippin.png" alt="Chippin"> <?php echo $this->getDescription() ?></p>
 
 
3
  </div>
app/etc/modules/Chippin_ChippinPayment.xml CHANGED
@@ -8,7 +8,6 @@
8
  <Mage_Core />
9
  <Mage_Payment />
10
  </depends>
11
- <version>0.1.4</version>
12
  </Chippin_ChippinPayment>
13
  </modules>
14
  </config>
8
  <Mage_Core />
9
  <Mage_Payment />
10
  </depends>
 
11
  </Chippin_ChippinPayment>
12
  </modules>
13
  </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>chippinpayments</name>
4
- <version>0.1.4</version>
5
  <stability>stable</stability>
6
  <license uri="https://raw.githubusercontent.com/Chippin/magento-chippin/master/LICENSE">MIT</license>
7
  <channel>community</channel>
@@ -12,13 +12,11 @@
12
  At the end of your checkout process, you redirect to Chippin with the basic details of the customer and your own unique order reference. At this point, the customer can invite their friends and family to &#x2018;chippin&#x2019; for the item(s) they are purchasing.&#xD;
13
  &#xD;
14
  Chippin is a simple &#x2018;plug-in&#x2019; that integrates quickly and seamlessly into any merchant&#x2019;s online checkout. It enables consumers to easily split the cost of an online transaction safely and securely to their own and the merchant&#x2019;s benefit.</description>
15
- <notes>Add version display to the admin configuration&#xD;
16
- Example callback URLs are now based on the default store base_url&#xD;
17
- The quotes now remain active until final paid status</notes>
18
  <authors><author><name>Toby Rhodes</name><user>chippin</user><email>alistair_stead+chippin@me.com</email></author><author><name>Alistair Stead</name><user>astead</user><email>alistair_stead@me.com</email></author></authors>
19
- <date>2016-10-03</date>
20
- <time>15:53:44</time>
21
- <contents><target name="magecommunity"><dir name="Chippin"><dir name="ChippinPayment"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="065377d94d6de8dbd5de8ea19eafe6a9"/></dir></dir></dir></dir><dir name="Form"><file name="Payment.php" hash="3a0271b81e0f2e4462d62bfdb25ca9b1"/></dir><dir name="Info"><file name="Payment.php" hash="dabf48fb246889ec342489ef8d1cede7"/></dir><file name="Redirect.php" hash="c0993c4c8b742f47b2e50cb4e8a79a82"/></dir><dir name="Helper"><file name="Checkout.php" hash="9d926f78da4debf034066f8e0909787c"/><file name="Data.php" hash="1dda04dbc384d0a6a4028cc9b66af581"/></dir><dir name="Model"><file name="Autoloader.php" hash="3feb122acae6983aba3e1fd2987ec06e"/><file name="Config.php" hash="4eaf3cad0239f78cc32568626dd5ccd5"/><file name="Order.php" hash="3a85255dfc216e5c7f11dcb09832f04b"/><dir name="Payment"><file name="Method.php" hash="fc80bbd7cbd274a7e545895bb7617269"/></dir><dir name="Resource"><file name="Setup.php" hash="86818d277788c5ba4a6b00656aaf9b0e"/></dir></dir><dir name="controllers"><file name="CheckoutController.php" hash="20dd2caff614689b5fe253b427e4939a"/><file name="StandardController.php" hash="5c433d1f42b092a0c83bc1208d433b5f"/></dir><dir name="data"><dir name="chippinpayment_setup"><file name="data-install-0.1.0.php" hash="70a757cb1d3c5a740a6751c8bb5ba229"/></dir></dir><dir name="etc"><file name="config.xml" hash="90354ec90e2ca99e0223ecc5396ee5fa"/><file name="system.xml" hash="a5045c351c97fddc10fe07e914b5ccc0"/></dir></dir></dir></target><target name="magelib"><dir name="Chippin"><dir name="SDK"><file name="Chippin.php" hash="8153aa6f7711b3e584eb15b922b8a6e3"/><file name="Merchant.php" hash="37bf825d41f2e6302bbee702c6171deb"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="chippinpayment"><file name="contributed.phtml" hash="1052c0346d429ffe0132c2f44f51b8b9"/><file name="declined.phtml" hash="789367eaac0e485e7526db9511eabfec"/><dir name="form"><file name="mark.phtml" hash="96911c10bf80f2eca89245ee575d628a"/></dir></dir></dir><dir name="layout"><file name="chippin.xml" hash="10deabd178d52fe3d3016c997a6fd2f8"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="chippinpayment"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="a5affb67f4d8b330c5ba6c8b840f4937"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Chippin_ChippinPayment.xml" hash="e90b70037ad52126c357bf0f15c5d29b"/></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>5.5.0</min><max>7.0.0</max></php></required></dependencies>
24
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>chippinpayments</name>
4
+ <version>0.1.6</version>
5
  <stability>stable</stability>
6
  <license uri="https://raw.githubusercontent.com/Chippin/magento-chippin/master/LICENSE">MIT</license>
7
  <channel>community</channel>
12
  At the end of your checkout process, you redirect to Chippin with the basic details of the customer and your own unique order reference. At this point, the customer can invite their friends and family to &#x2018;chippin&#x2019; for the item(s) they are purchasing.&#xD;
13
  &#xD;
14
  Chippin is a simple &#x2018;plug-in&#x2019; that integrates quickly and seamlessly into any merchant&#x2019;s online checkout. It enables consumers to easily split the cost of an online transaction safely and securely to their own and the merchant&#x2019;s benefit.</description>
15
+ <notes>Make new order status configurable</notes>
 
 
16
  <authors><author><name>Toby Rhodes</name><user>chippin</user><email>alistair_stead+chippin@me.com</email></author><author><name>Alistair Stead</name><user>astead</user><email>alistair_stead@me.com</email></author></authors>
17
+ <date>2016-12-08</date>
18
+ <time>00:38:08</time>
19
+ <contents><target name="magecommunity"><dir name="Chippin"><dir name="ChippinPayment"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="065377d94d6de8dbd5de8ea19eafe6a9"/></dir></dir></dir></dir><dir name="Form"><file name="Payment.php" hash="3a0271b81e0f2e4462d62bfdb25ca9b1"/></dir><dir name="Info"><file name="Payment.php" hash="dabf48fb246889ec342489ef8d1cede7"/></dir><file name="Redirect.php" hash="c0993c4c8b742f47b2e50cb4e8a79a82"/></dir><dir name="Helper"><file name="Checkout.php" hash="9d926f78da4debf034066f8e0909787c"/><file name="Data.php" hash="1dda04dbc384d0a6a4028cc9b66af581"/></dir><dir name="Model"><file name="Autoloader.php" hash="3feb122acae6983aba3e1fd2987ec06e"/><file name="Config.php" hash="c673fc00a3a4205e1ac0eb5b5b18dde9"/><file name="Order.php" hash="3a85255dfc216e5c7f11dcb09832f04b"/><dir name="Payment"><file name="Method.php" hash="fb28bbbd81a6850410672be63b8cb53d"/></dir><dir name="Resource"><file name="Setup.php" hash="86818d277788c5ba4a6b00656aaf9b0e"/></dir></dir><dir name="controllers"><file name="CheckoutController.php" hash="20dd2caff614689b5fe253b427e4939a"/><file name="StandardController.php" hash="fbb072d160c28efcf07c067a18c00862"/></dir><dir name="data"><dir name="chippinpayment_setup"><file name="data-install-0.1.0.php" hash="70a757cb1d3c5a740a6751c8bb5ba229"/></dir></dir><dir name="etc"><file name="config.xml" hash="5e55002710f9957fa3dfccc1f0ef8c0c"/><file name="system.xml" hash="41187a99f388dfc8937db880d78d40f2"/></dir></dir></dir></target><target name="magelib"><dir name="Chippin"><dir name="SDK"><file name="Chippin.php" hash="8153aa6f7711b3e584eb15b922b8a6e3"/><file name="Merchant.php" hash="37bf825d41f2e6302bbee702c6171deb"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="chippinpayment"><file name="contributed.phtml" hash="1052c0346d429ffe0132c2f44f51b8b9"/><file name="declined.phtml" hash="789367eaac0e485e7526db9511eabfec"/><dir name="form"><file name="mark.phtml" hash="a1626d7c8c74214b1244e7f8e9ecdb6b"/></dir></dir></dir><dir name="layout"><file name="chippin.xml" hash="10deabd178d52fe3d3016c997a6fd2f8"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="chippinpayment"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="a5affb67f4d8b330c5ba6c8b840f4937"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Chippin_ChippinPayment.xml" hash="33e1a7aae8f7fc9ebe8992a06ddda506"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.5.0</min><max>7.0.0</max></php></required></dependencies>
22
  </package>