0
Q
實現在軌應用
A
回答
1
免責聲明:尚未完全工作...
我已經做了這樣的:(見下文)
所以我把它變成一個模型,把它稱爲從控制器,並將其發送到一份文件。 轉換可以簡單地通過to_xml
class MyController < ApplicationController
def download_sepa
content = Pupil.sepa_for_all
send_data content, :filename => "sepa.xml"
end
end
class Pupil < ActiveRecord::Base
def sepa_for_all(params={})
sdd = SEPA::DirectDebit.new(
# Name of the initiating party and creditor, in German: "Auftraggeber"
# String, max. 70 char
name: 'MEIN NAME',
# Business Identifier Code (SWIFT-Code) of the creditor
# String, 8 or 11 char
bic: 'BICDE33XXX',
# International Bank Account Number of the creditor
# String, max. 34 chars
iban: 'DE14711081500234324766',
# Creditor Identifier, in German: Gläubiger-Identifikationsnummer
# String, max. 35 chars
creditor_identifier: 'DE471108ZZ99999'
)
# Second: Add transactions
sdd.add_transaction(
# Name of the debtor, in German: "Zahlungspflichtiger"
# String, max. 70 char
name: contract.account.account_holder.asciify,
# Put all details of the transaction in the [...] part:
[...]
)
sdd.to_xml
end
end
完成XML將成功生成可惜我不能設法接受我的銀行軟件的XML文件。儘管如此,我希望這會讓你走上正確的道路。 T.
相關問題
- 1. 問題,實現在軌
- 2. 我想在我的導軌應用程序中實現配樂
- 3. 如何實現在軌道上的應用mturk
- 4. 實現社交共享按鈕在軌道3應用
- 5. 實現在Django應用
- 6. 實現Web應用
- 7. 設計現有導軌應用程序
- 8. 在增強現實應用中實現雷達視圖
- 9. 在android中,如何使用Chromecast實現'多軌音頻支持'?
- 10. 如何實現用戶特定子域在軌
- 11. 即時通訊實現的軌道?
- 12. 導軌實現刪除屬性
- 13. 實現ActiveModel髒軌道的問題3.2.8
- 14. 實現位置登記軌道
- 15. 我應該實現用Clojure
- 16. WSO2實現從碳應用
- 17. 在iOS應用中實現OsmAnd
- 18. 在ASP.Net應用程序中實現HPKP
- 19. 在Android中實現應用內購買?
- 20. VOIP在iPhone應用中的實現
- 21. 如何在Flask應用中實現ElasticSearch?
- 22. 在ios應用中實現mobilefirst服務
- 23. 在iPhone應用中實現WebDAV連接
- 24. 在應用程序中實現聊天?
- 25. 在Java應用程序中實現Growl
- 26. 在Web應用程序中實現OAuth2.0
- 27. 如何在iphone應用上實現adwhirl?
- 28. 在iOS應用中實現OAuth 1.0
- 29. 在應用Android中實現paypal付款
- 30. 在iOS應用程序中實現sqlite3_busy_timeout()
這絕對是一個很好的開始!非常感謝!! – SoSimple
請注意,sdd.to_xml必須是_inside_'sepa_for_all'方法。我的縮進是錯誤的。 – fenton