Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order description is not showing up on the customer ideal payment page? #3

Open
voordev opened this issue May 2, 2020 · 1 comment

Comments

@voordev
Copy link

voordev commented May 2, 2020

Once again my grattitude for providing this gem.
We have implemented the basic payment correctly.

I have 1 final issue thought which perhaps is related to the gem.
The description and "Verkooppunt"(set in rabo dashboard) are not listed on the payment screens.
It seems to show the url of the website + order ID only.
Is there anything we need to do to get this information correctly listed.

response = Omnikassa2.announce_order(
Omnikassa2::MerchantOrder.new(
merchant_order_id: @student.pay_id,
amount: Omnikassa2::Money.new(
amount: 399,
currency: 'EUR'
),
description: "our custom description that is not showing up",
payment_brand: 'IDEAL',
payment_brand_force: 'FORCE_ALWAYS',
merchant_return_url: APP_CONFIG['OMNIKASSA_RETURN_URL']
)
)

`

Is this because of an error on my end, or does the account have to be validated by rabostaff? We have currently both the staging and production keys already provided in the dashboard.

@voordev
Copy link
Author

voordev commented May 4, 2020

So a workaround for this is:
But still the "Verkoop punt" Is not showing up in the payment details of the ideal bank.
Its lists the URL of the webshop. It does list the name of the "verkooppunt" correctly on the payment screen from rabobank.
Is there a way to have the verkoop punt listed correctly also on the ideal payment screen of the bank?

  class MerchantOrder

    attr_reader :description

    def initialize(params)
      @merchant_return_url = params.fetch(:merchant_return_url)
      @merchant_order_id = params.fetch(:merchant_order_id)
      @amount = params.fetch(:amount)

      @payment_brand = params.fetch(:payment_brand, nil)
      @payment_brand_force = params.fetch(:payment_brand_force, nil)
      @description = params.fetch(:description, nil)
    end

    def self.csv_serializer
      output = Omnikassa2::CSVSerializer.new([
                                        { field: :timestamp },
                                        { field: :merchant_order_id },
                                        {
                                            field: :amount,
                                            nested_fields: [
                                                { field: :currency },
                                                { field: :amount }
                                            ]
                                        },
                                        { field: :language, include_if_nil: true },
                                        { field: :description, include_if_nil: true },
                                        { field: :merchant_return_url },
                                        { field: :payment_brand },
                                        { field: :payment_brand_force }
                                    ])

    end


  end

  class OrderAnnounceRequest < BaseRequest

    def body
      result = {
          'timestamp' => @merchant_order.timestamp,
          'merchantOrderId' => @merchant_order.merchant_order_id,
          'description' => @merchant_order.description,
          'amount' => {
              'amount' => @merchant_order.amount.amount.to_s,
              'currency' => @merchant_order.amount.currency
          },
          'merchantReturnURL' => @merchant_order.merchant_return_url,
          'signature' => @merchant_order.signature
      }

      result['paymentBrand'] = @merchant_order.payment_brand unless @merchant_order.payment_brand.nil?
      result['paymentBrandForce'] = @merchant_order.payment_brand_force unless @merchant_order.payment_brand_force.nil?


      result
    end

  end

end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant