Development

Changeset 22544

You must first sign up to be able to contribute.

Changeset 22544

Show
Ignore:
Timestamp:
09/28/09 15:03:51 (4 years ago)
Author:
jiappo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPaymentPlugin/branches/1.2-jiap/config/app.yml

    r22411 r22544  
    22  #sfPaymentPlugin 
    33  sf_payment_plugin: 
    4     #cartClass:        #name of cart's class 
    5     #itemClass:        #name of item's class 
     4    cart_class: Cart       #name of cart's class 
     5    item_class: Item       #name of item's class 
  • plugins/sfPaymentPlugin/branches/1.2-jiap/config/doctrine/schema.yml

    r22411 r22544  
    22  columns: 
    33    reference: 
    4       type: string(255
     4      type: string(50
    55      primary: true 
     6      notnull: true 
    67    type: 
    78      type: string(20) 
     9      primary: true 
    810      notnull: true 
    911    date: 
     
    1113      notnull: true 
    1214    status: 
    13       type: string(20
     15      type: string(15
    1416      notnull: true 
    1517    vendor: 
    16       type: string(255
     18      type: string(100
    1719      notnull: true 
    1820    buyer: 
    19       type: string(255
     21      type: string(100
    2022      notnull: true 
    2123    total_amount: 
  • plugins/sfPaymentPlugin/branches/1.2-jiap/lib/model/doctrine/PluginsfPaymentDoctrineStorageTable.class.php

    r22411 r22544  
    1515class PluginsfPaymentDoctrineStorageTable extends Doctrine_Table implements sfPaymentStorageInterface 
    1616{ 
    17   public function getTransaction($reference) { 
    18     $storage = $this->createQuery('t')->Where('t.reference = ?', $reference)->fetchOne(); 
     17  public function getTransaction($type, $reference) 
     18  { 
     19    $storage = Doctrine_Query::create() 
     20      ->from('sfPaymentDoctrineStorage s') 
     21      ->Where('s.reference = ?', $reference) 
     22      ->andWhere('s.type = ?', $type) 
     23      ->fetchOne(); 
    1924 
    20     $transaction = new sfPaymentTransaction(); 
     25    $transaction = new sfPaymentTransaction(NULL, sfPaymentTransaction::DOCTRINE_STORAGE); 
    2126    $transaction->setGateway(unserialize($storage->getParams())); 
    22     $transaction->setStorage($storage); 
    2327 
    2428    return $transaction; 
    2529  } 
    2630 
    27   public function saveTransaction(sfPaymentTransaction $transaction) { 
     31  public function saveTransaction(sfPaymentTransaction $transaction) 
     32  { 
    2833    $storage = new sfPaymentDoctrineStorage(); 
    2934    $storage->setReference($transaction->getReference()); 
  • plugins/sfPaymentPlugin/branches/1.2-jiap/lib/sfPaymentStorageInterface.php

    r22411 r22544  
    1313 */ 
    1414 
    15 interface sfPaymentStorageInterface { 
     15interface sfPaymentStorageInterface 
     16
    1617 
    17   public function getTransaction($reference); 
     18  public function getTransaction($type, $reference); 
    1819 
    1920  public function saveTransaction(sfPaymentTransaction $transaction);