The payment status is not displayed

HomeSupportImage StoreThe payment status is not displayed

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #71390
    roeless
    Member

    Hi there,

    I just implemented a new payment gateway for Sisow. The payment seems to be working, but I noticed a couple of things that I would like to have solved. I hope someone here help me with that.

    When checking the orders that are created using the plugin and the sisow payment gateway I noticed that on the order overview page (page=ims-sales) the payment status is not displayed. It is just blank.

    I used the following code to set the status in the ‘process_notice’ function that is been called on the ‘ims_before_post_actions’ hook.

    
    switch( $sisow->status )
    {
      case Sisow::statusOpen: $ImStoreCart->data['payment_status'] ='Pending';
                              break;
      case Sisow::statusExpired: $ImStoreCart->data['payment_status'] ='Expired';
                                 break;
      case Sisow::statusFailure: $ImStoreCart->data['payment_status'] ='Failure';
                                 break;
      case Sisow::statusSuccess: $ImStoreCart->data['payment_status'] ='Success';
                                 break;
      case Sisow::statusCancelled: $ImStoreCart->data['payment_status'] ='Canceled';
                                   break;
      default: $ImStoreCart->data['payment_status'] ='Unknown';
               break;
    }
    

    A second thing that I noticed is that on the order detail page the information is a bit chaotic. The first column below the photo’s list. looks incorrect.

    The following code is used to fill the order with information.

    
    $ImStoreCart->setup_cart( $sisow->purchaseId );
    do_action( 'ims_before_sisow_notice', false, $sisow->purchaseId );
    
    $order =get_post( $sisow->purchaseId );
    $user =get_user_by( 'id', $order->post_author );
    
    $ImStoreCart->data['txn_id']          =$sisow->trxId;
    $ImStoreCart->data['method']          ='Sisow';
    $ImStoreCart->data['mc_currency']     ='EUR';
    $ImStoreCart->data['payment_gross']   =$sisow->amount;
    $ImStoreCart->data['payment_status']  =... see above ...
    $ImStoreCart->data['mc_gross']        =$sisow->amount;
    $ImStoreCart->data['ims_phone']       =$user->ims_phone;
    $ImStoreCart->data['first_name']      =$user->user_firstname;
    $ImStoreCart->data['user_email']      =$user->user_email;
    $ImStoreCart->data['address_zip']     =$user->ims_zip;
    $ImStoreCart->data['payer_email']     =$user->user_email;
    $ImStoreCart->data['address_city']    =$user->ims_city;
    $ImStoreCart->data['instructions'] =$ImStoreCart->cart['instructions'];
    $ImStoreCart->data['address_state']   ='';
    $ImStoreCart->data['address_street']  =$user->ims_address;
    $ImStoreCart->data['num_cart_items'] =$ImStoreCart->cart['items'];
    $ImStoreCart->data['address_country'] ='NL';
    
    $ImStoreCart->checkout( );
    do_action( 'ims_after_sisow_notice', $sisow->purchaseId, $ImStoreCart->data )
    

    See the following screenshot ‘http://fotostudiowijchen.nl/test/screenshot.png’

    Method maps to $ImStoreCart->data[‘method’]
    Datum maps to the creation date of the order
    Ordernumber maps to $ImStoreCart->data[‘txn_id’]
    Klant maps to nothing aperently, I expected $ImStoreCart->data[‘first_name’]
    Afleveradres maps to $ImStoreCart->data[‘address_street’]
    Aflerveradres2 maps to city, zip, country
    E-mail display nothing I expected $ImStoreCart->data[‘payer_email’] or user_email
    Telefoon display nothing I expected $ImStoreCart->data[‘ims_phone’]

    I expected to see a separation in zip code and city

    Something like

    Method -> Payment method
    Datum -> creation date
    Ordernumber -> txrid of the order
    Klant -> first + last name of the customer taken from a user
    Afleveradres -> Streetname + house number (ims_address)
    Aflerveradres2 -> Other address information or not used
    Zipcode -> zip code of the user (ims_zip)
    City -> Name of the city (ims_city)
    Country -> Name of the country (ims_country)
    E-mail -> email address of the customer (user_email)
    Telefoon -> Phone number of the user (ims_zip)

    This would make the detail page clearer instead of assuming that city, zip, country combined for address2 is used every where. We normally only combine the zipcode with the city (for example: 1111AA Amsterdam). Country is placed below that.

    #78243
    Xpark Media
    Keymaster

    @roeless,

    if the gateway sends a payment notification the cart data could be modified. Check the status using the ims_after_post_actions hook

    the sales detail page could be more clear, but you can completely customize the page please view custom registration form post

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.